Skip to content

Commit

Permalink
LWG-3621 Remove feature-test macro __cpp_lib_monadic_optional
Browse files Browse the repository at this point in the history
  • Loading branch information
cpplearner committed Feb 8, 2022
1 parent bbd5dba commit 7a69988
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 22 deletions.
11 changes: 4 additions & 7 deletions stl/inc/yvals_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -1365,12 +1365,7 @@
#define __cpp_lib_byteswap 202110L
#define __cpp_lib_invoke_r 202106L
#define __cpp_lib_is_scoped_enum 202011L

#ifdef __cpp_lib_concepts
#define __cpp_lib_monadic_optional 202110L
#endif // __cpp_lib_concepts

#define __cpp_lib_move_only_function 202110L
#define __cpp_lib_move_only_function 202110L

#ifdef __cpp_lib_concepts
#define __cpp_lib_out_ptr 202106L
Expand Down Expand Up @@ -1407,7 +1402,9 @@
#endif // language mode
#endif // _M_CEE

#if _HAS_CXX20
#if _HAS_CXX23 && defined(__cpp_lib_concepts)
#define __cpp_lib_optional 202110L // P0798R8 Monadic Operations For optional
#elif _HAS_CXX20 // ^^^ _HAS_CXX23 / _HAS_CXX20 vvv
#define __cpp_lib_optional 202106L // P2231R1 Completing constexpr In optional And variant
#elif _HAS_CXX17 // ^^^ _HAS_CXX20 / _HAS_CXX17 vvv
#define __cpp_lib_optional 201606L // P0307R2 Making Optional Greater Equal Again
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1192,20 +1192,6 @@ STATIC_ASSERT(__cpp_lib_memory_resource == 201603L);
#endif
#endif

#if _HAS_CXX23 && !defined(__EDG__) // TRANSITION, EDG concepts support
#ifndef __cpp_lib_monadic_optional
#error __cpp_lib_monadic_optional is not defined
#elif __cpp_lib_monadic_optional != 202110L
#error __cpp_lib_monadic_optional is not 202110L
#else
STATIC_ASSERT(__cpp_lib_monadic_optional == 202110L);
#endif
#else
#ifdef __cpp_lib_monadic_optional
#error __cpp_lib_monadic_optional is defined
#endif
#endif

#if _HAS_CXX23
#ifndef __cpp_lib_move_only_function
#error __cpp_lib_move_only_function is not defined
Expand Down Expand Up @@ -1264,7 +1250,15 @@ STATIC_ASSERT(__cpp_lib_not_fn == 201603L);
STATIC_ASSERT(__cpp_lib_null_iterators == 201304L);
#endif

#if _HAS_CXX20
#if _HAS_CXX23 && !defined(__EDG__) // TRANSITION, EDG concepts support
#ifndef __cpp_lib_optional
#error __cpp_lib_optional is not defined
#elif __cpp_lib_optional != 202110L
#error __cpp_lib_optional is not 202110L
#else
STATIC_ASSERT(__cpp_lib_optional == 202110L);
#endif
#elif _HAS_CXX20
#ifndef __cpp_lib_optional
#error __cpp_lib_optional is not defined
#elif __cpp_lib_optional != 202106L
Expand Down

0 comments on commit 7a69988

Please sign in to comment.