Index: include/variant =================================================================== --- include/variant +++ include/variant @@ -466,17 +466,21 @@ 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 &__dispatcher<_Is...>::template __dispatch<_Fp, _Vs...>; } template