Index: include/variant =================================================================== --- include/variant +++ include/variant @@ -466,17 +466,22 @@ return __result{{_VSTD::forward<_Fs>(__fs)...}}; } - template - inline _LIBCPP_INLINE_VISIBILITY - static constexpr auto __make_dispatch(index_sequence<_Is...>) { - struct __dispatcher { - static constexpr decltype(auto) __dispatch(_Fp __f, _Vs... __vs) { + template + struct __dispatcher { + template + inline _LIBCPP_INLINE_VISIBILITY + static constexpr decltype(auto) __dispatch(_Fp __f, _Vs... __vs) { return __invoke_constexpr( static_cast<_Fp>(__f), __access::__base::__get_alt<_Is>(static_cast<_Vs>(__vs))...); - } - }; - return _VSTD::addressof(__dispatcher::__dispatch); + } + }; + + template + inline _LIBCPP_INLINE_VISIBILITY + static constexpr auto __make_dispatch(index_sequence<_Is...>) { + return _VSTD::addressof( + __dispatcher<_Is...>::template __dispatch<_Fp, _Vs...>); } template Index: test/std/utilities/variant/variant.visit/visit.pass.cpp =================================================================== --- test/std/utilities/variant/variant.visit/visit.pass.cpp +++ test/std/utilities/variant/variant.visit/visit.pass.cpp @@ -10,9 +10,6 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// FIXME: This test hangs for an unknown reason on Windows. See llvm.org/PR31642 -// UNSUPPORTED: windows - // // template // constexpr see below visit(Visitor&& vis, Variants&&... vars);