@@ -285,7 +285,9 @@ void test_const_lvalue_get() {
285285 {
286286 using V = std::variant<int , const long >;
287287 constexpr V v (42 );
288- static_assert (noexcept (std::get<0 >(v)) == is_permissive);
288+ #if defined(_MSVC_INTERNAL_TESTING) || defined(__clang__) || defined(__EDG__) // TRANSITION, vs17.12p3
289+ ASSERT_NOT_NOEXCEPT (std::get<0 >(v));
290+ #endif // ^^^ no workaround ^^^
289291 ASSERT_SAME_TYPE (decltype (std::get<0 >(v)), const int &);
290292 static_assert (std::get<0 >(v) == 42 , " " );
291293 }
@@ -299,7 +301,9 @@ void test_const_lvalue_get() {
299301 {
300302 using V = std::variant<int , const long >;
301303 constexpr V v (42l );
302- static_assert (noexcept (std::get<1 >(v)) == is_permissive);
304+ #if defined(_MSVC_INTERNAL_TESTING) || defined(__clang__) || defined(__EDG__) // TRANSITION, vs17.12p3
305+ ASSERT_NOT_NOEXCEPT (std::get<1 >(v));
306+ #endif // ^^^ no workaround ^^^
303307 ASSERT_SAME_TYPE (decltype (std::get<1 >(v)), const long &);
304308 static_assert (std::get<1 >(v) == 42 , " " );
305309 }
@@ -447,7 +451,9 @@ void test_const_lvalue_get() {
447451 {
448452 using V = std::variant<int , const long >;
449453 constexpr V v (42 );
450- static_assert (noexcept (std::get<int >(v)) == is_permissive);
454+ #if defined(_MSVC_INTERNAL_TESTING) || defined(__clang__) || defined(__EDG__) // TRANSITION, vs17.12p3
455+ ASSERT_NOT_NOEXCEPT (std::get<int >(v));
456+ #endif // ^^^ no workaround ^^^
451457 ASSERT_SAME_TYPE (decltype (std::get<int >(v)), const int &);
452458 static_assert (std::get<int >(v) == 42 , " " );
453459 }
@@ -461,7 +467,9 @@ void test_const_lvalue_get() {
461467 {
462468 using V = std::variant<int , const long >;
463469 constexpr V v (42l );
464- static_assert (noexcept (std::get<const long >(v)) == is_permissive);
470+ #if defined(_MSVC_INTERNAL_TESTING) || defined(__clang__) || defined(__EDG__) // TRANSITION, vs17.12p3
471+ ASSERT_NOT_NOEXCEPT (std::get<const long >(v));
472+ #endif // ^^^ no workaround ^^^
465473 ASSERT_SAME_TYPE (decltype (std::get<const long >(v)), const long &);
466474 static_assert (std::get<const long >(v) == 42 , " " );
467475 }
0 commit comments