Skip to content

[libc++] Updated <version>'s __cpp_lib_constrained_equality value #144553

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions libcxx/include/version
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ __cpp_lib_constexpr_tuple 201811L <tuple>
__cpp_lib_constexpr_typeinfo 202106L <typeinfo>
__cpp_lib_constexpr_utility 201811L <utility>
__cpp_lib_constexpr_vector 201907L <vector>
__cpp_lib_constrained_equality 202403L <optional> <tuple> <utility>
<variant>
__cpp_lib_constrained_equality 202411L <expected> <optional> <tuple>
<utility> <variant>
__cpp_lib_containers_ranges 202202L <deque> <forward_list> <list>
<map> <queue> <set>
<stack> <string> <unordered_map>
Expand Down Expand Up @@ -549,7 +549,7 @@ __cpp_lib_void_t 201411L <type_traits>
# define __cpp_lib_constexpr_new 202406L
# endif
# define __cpp_lib_constexpr_queue 202502L
// # define __cpp_lib_constrained_equality 202403L
// # define __cpp_lib_constrained_equality 202411L
// # define __cpp_lib_copyable_function 202306L
// # define __cpp_lib_debugging 202311L
// # define __cpp_lib_default_template_type_for_algorithm_values 202403L
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@

#if TEST_STD_VER < 14

# ifdef __cpp_lib_constrained_equality
# error "__cpp_lib_constrained_equality should not be defined before c++26"
# endif

# ifdef __cpp_lib_expected
# error "__cpp_lib_expected should not be defined before c++23"
# endif
Expand All @@ -30,6 +34,10 @@

#elif TEST_STD_VER == 14

# ifdef __cpp_lib_constrained_equality
# error "__cpp_lib_constrained_equality should not be defined before c++26"
# endif

# ifdef __cpp_lib_expected
# error "__cpp_lib_expected should not be defined before c++23"
# endif
Expand All @@ -40,6 +48,10 @@

#elif TEST_STD_VER == 17

# ifdef __cpp_lib_constrained_equality
# error "__cpp_lib_constrained_equality should not be defined before c++26"
# endif

# ifdef __cpp_lib_expected
# error "__cpp_lib_expected should not be defined before c++23"
# endif
Expand All @@ -50,6 +62,10 @@

#elif TEST_STD_VER == 20

# ifdef __cpp_lib_constrained_equality
# error "__cpp_lib_constrained_equality should not be defined before c++26"
# endif

# ifdef __cpp_lib_expected
# error "__cpp_lib_expected should not be defined before c++23"
# endif
Expand All @@ -60,6 +76,10 @@

#elif TEST_STD_VER == 23

# ifdef __cpp_lib_constrained_equality
# error "__cpp_lib_constrained_equality should not be defined before c++26"
# endif

# ifndef __cpp_lib_expected
# error "__cpp_lib_expected should be defined in c++23"
# endif
Expand All @@ -73,6 +93,19 @@

#elif TEST_STD_VER > 23

# if !defined(_LIBCPP_VERSION)
# ifndef __cpp_lib_constrained_equality
# error "__cpp_lib_constrained_equality should be defined in c++26"
# endif
# if __cpp_lib_constrained_equality != 202411L
# error "__cpp_lib_constrained_equality should have the value 202411L in c++26"
# endif
# else
# ifdef __cpp_lib_constrained_equality
# error "__cpp_lib_constrained_equality should not be defined because it is unimplemented in libc++!"
# endif
# endif

# ifndef __cpp_lib_expected
# error "__cpp_lib_expected should be defined in c++26"
# endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@
# ifndef __cpp_lib_constrained_equality
# error "__cpp_lib_constrained_equality should be defined in c++26"
# endif
# if __cpp_lib_constrained_equality != 202403L
# error "__cpp_lib_constrained_equality should have the value 202403L in c++26"
# if __cpp_lib_constrained_equality != 202411L
# error "__cpp_lib_constrained_equality should have the value 202411L in c++26"
# endif
# else
# ifdef __cpp_lib_constrained_equality
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@
# ifndef __cpp_lib_constrained_equality
# error "__cpp_lib_constrained_equality should be defined in c++26"
# endif
# if __cpp_lib_constrained_equality != 202403L
# error "__cpp_lib_constrained_equality should have the value 202403L in c++26"
# if __cpp_lib_constrained_equality != 202411L
# error "__cpp_lib_constrained_equality should have the value 202411L in c++26"
# endif
# else
# ifdef __cpp_lib_constrained_equality
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,8 @@
# ifndef __cpp_lib_constrained_equality
# error "__cpp_lib_constrained_equality should be defined in c++26"
# endif
# if __cpp_lib_constrained_equality != 202403L
# error "__cpp_lib_constrained_equality should have the value 202403L in c++26"
# if __cpp_lib_constrained_equality != 202411L
# error "__cpp_lib_constrained_equality should have the value 202411L in c++26"
# endif
# else
# ifdef __cpp_lib_constrained_equality
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@
# ifndef __cpp_lib_constrained_equality
# error "__cpp_lib_constrained_equality should be defined in c++26"
# endif
# if __cpp_lib_constrained_equality != 202403L
# error "__cpp_lib_constrained_equality should have the value 202403L in c++26"
# if __cpp_lib_constrained_equality != 202411L
# error "__cpp_lib_constrained_equality should have the value 202411L in c++26"
# endif
# else
# ifdef __cpp_lib_constrained_equality
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6548,8 +6548,8 @@
# ifndef __cpp_lib_constrained_equality
# error "__cpp_lib_constrained_equality should be defined in c++26"
# endif
# if __cpp_lib_constrained_equality != 202403L
# error "__cpp_lib_constrained_equality should have the value 202403L in c++26"
# if __cpp_lib_constrained_equality != 202411L
# error "__cpp_lib_constrained_equality should have the value 202411L in c++26"
# endif
# else
# ifdef __cpp_lib_constrained_equality
Expand Down
7 changes: 5 additions & 2 deletions libcxx/utils/generate_feature_test_macro_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,11 @@ def add_version_header(tc):
},
{
"name": "__cpp_lib_constrained_equality",
"values": {"c++26": 202403}, # P2944R3: Comparisons for reference_wrapper
"headers": ["optional", "tuple", "utility", "variant"],
"values": {
# "c++26": 202403, # P2944R3: Comparisons for reference_wrapper
"c++26": 202411, # P3379R0: Constrain std::expected equality operators
},
"headers": ["expected", "optional", "tuple", "utility", "variant"],
"unimplemented": True,
},
{
Expand Down
Loading