@@ -494,6 +494,10 @@ namespace mpark {
494
494
495
495
namespace visitation {
496
496
497
+ #if defined(MPARK_CPP14_CONSTEXPR) && !defined(_MSC_VER)
498
+ #define MPARK_VARIANT_SWITCH_VISIT
499
+ #endif
500
+
497
501
struct base {
498
502
template <typename Visitor, typename ... Vs>
499
503
using dispatch_result_t = decltype (
@@ -521,7 +525,7 @@ namespace mpark {
521
525
lib::forward<Alts>(alts)...))
522
526
};
523
527
524
- #ifdef MPARK_CPP14_CONSTEXPR
528
+ #ifdef MPARK_VARIANT_SWITCH_VISIT
525
529
template <bool B, typename R, typename ... ITs>
526
530
struct dispatcher ;
527
531
@@ -802,7 +806,7 @@ namespace mpark {
802
806
#endif
803
807
};
804
808
805
- #ifndef MPARK_CPP14_CONSTEXPR
809
+ #ifndef MPARK_VARIANT_SWITCH_VISIT
806
810
template <typename F, typename ... Vs>
807
811
using fmatrix_t = decltype (base::make_fmatrix<F, Vs...>());
808
812
@@ -846,7 +850,7 @@ namespace mpark {
846
850
template <typename Visitor, typename ... Vs>
847
851
inline static constexpr DECLTYPE_AUTO visit_alt (Visitor &&visitor,
848
852
Vs &&... vs)
849
- #ifdef MPARK_CPP14_CONSTEXPR
853
+ #ifdef MPARK_VARIANT_SWITCH_VISIT
850
854
DECLTYPE_AUTO_RETURN (
851
855
base::dispatcher<
852
856
true ,
@@ -867,7 +871,7 @@ namespace mpark {
867
871
inline static constexpr DECLTYPE_AUTO visit_alt_at (std::size_t index,
868
872
Visitor &&visitor,
869
873
Vs &&... vs)
870
- #ifdef MPARK_CPP14_CONSTEXPR
874
+ #ifdef MPARK_VARIANT_SWITCH_VISIT
871
875
DECLTYPE_AUTO_RETURN (
872
876
base::dispatcher<
873
877
true ,
0 commit comments