Commit a4c634c0 authored by Harris Hancock's avatar Harris Hancock

Add VoidSfinae, a std::void_t clone

MSVC cannot compile the overloaded member function SFINAE technique used
in Kind_ and FromAny_. It has an easier time with std::void_t-style
SFINAE.
parent 2e85cef3
......@@ -340,6 +340,10 @@ template <bool b> using EnableIf = typename EnableIf_<b>::Type;
// template <typename T, typename = EnableIf<isValid<T>()>
// void func(T&& t);
template <typename...> struct VoidSfinae_ { using Type = void; };
template <typename... Ts> using VoidSfinae = typename VoidSfinae_<Ts...>::Type;
// Note: VoidSfinae is std::void_t from C++17.
template <typename T>
T instance() noexcept;
// Like std::declval, but doesn't transform T into an rvalue reference. If you want that, specify
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment