diff --git a/include/boost/openmethod/initialize.hpp b/include/boost/openmethod/initialize.hpp index 7f829d8..6862cc3 100644 --- a/include/boost/openmethod/initialize.hpp +++ b/include/boost/openmethod/initialize.hpp @@ -476,14 +476,13 @@ void registry::compiler::initialize() { registry::initialized = true; } -#ifdef _MSC_VER namespace detail { template -struct msvc_tuple_get; +struct tuple_get; template -struct msvc_tuple_get { +struct tuple_get { template static decltype(auto) fn(const Tuple& t) { return std::get(t); @@ -491,26 +490,20 @@ struct msvc_tuple_get { }; template -struct msvc_tuple_get { +struct tuple_get { template static decltype(auto) fn(const Tuple&) { return T(); } }; } // namespace detail -#endif template template registry::compiler::compiler(Options... opts) : options(opts...) { if constexpr (has_trace) { -#ifdef _MSC_VER - tr.on = detail::msvc_tuple_get::fn(options).on; -#else - // Even with the constexpr has_trace guard, msvc errors on this. - tr.on = std::get(options).on; -#endif + tr.on = detail::tuple_get::fn(options).on; } }