Skip to content

Commit 580416d

Browse files
committed
[libcxx] updates the feature-test macro generator
D97015 didn't correctly update `generate_feature_test_macro_components.py`. Reviewed By: ldionne, Quuxplusone, #libc, Mordante Differential Revision: https://reviews.llvm.org/D97904
1 parent 626a31d commit 580416d

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

libcxx/include/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ __cpp_lib_void_t 201411L <type_traits>
337337
# define __cpp_lib_latch 201907L
338338
# endif
339339
# define __cpp_lib_list_remove_return_type 201806L
340-
# ifndef _LIBCPP_HAS_NO_CONCEPTS
340+
# if !defined(_LIBCPP_HAS_NO_CONCEPTS)
341341
# define __cpp_lib_math_constants 201907L
342342
# endif
343343
// # define __cpp_lib_polymorphic_allocator 201902L

libcxx/test/std/language.support/support.limits/support.limits.general/numbers.version.pass.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
#elif TEST_STD_VER == 20
4444

45-
# ifndef _LIBCPP_HAS_NO_CONCEPTS
45+
# if defined(__cpp_concepts) && __cpp_concepts >= 201907L
4646
# ifndef __cpp_lib_math_constants
4747
# error "__cpp_lib_math_constants should be defined in c++20"
4848
# endif
@@ -53,11 +53,11 @@
5353
# ifdef __cpp_lib_math_constants
5454
# error "__cpp_lib_math_constants should not be defined when defined(__cpp_concepts) && __cpp_concepts >= 201907L is not defined!"
5555
# endif
56-
# endif // _LIBCPP_HAS_NO_CONCEPTS
56+
# endif
5757

5858
#elif TEST_STD_VER > 20
5959

60-
# ifndef _LIBCPP_HAS_NO_CONCEPTS
60+
# if defined(__cpp_concepts) && __cpp_concepts >= 201907L
6161
# ifndef __cpp_lib_math_constants
6262
# error "__cpp_lib_math_constants should be defined in c++2b"
6363
# endif
@@ -68,7 +68,7 @@
6868
# ifdef __cpp_lib_math_constants
6969
# error "__cpp_lib_math_constants should not be defined when defined(__cpp_concepts) && __cpp_concepts >= 201907L is not defined!"
7070
# endif
71-
# endif // _LIBCPP_HAS_NO_CONCEPTS
71+
# endif
7272

7373
#endif // TEST_STD_VER > 20
7474

libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2890,7 +2890,7 @@
28902890
# error "__cpp_lib_map_try_emplace should have the value 201411L in c++20"
28912891
# endif
28922892

2893-
# ifndef _LIBCPP_HAS_NO_CONCEPTS
2893+
# if defined(__cpp_concepts) && __cpp_concepts >= 201907L
28942894
# ifndef __cpp_lib_math_constants
28952895
# error "__cpp_lib_math_constants should be defined in c++20"
28962896
# endif
@@ -2901,7 +2901,7 @@
29012901
# ifdef __cpp_lib_math_constants
29022902
# error "__cpp_lib_math_constants should not be defined when defined(__cpp_concepts) && __cpp_concepts >= 201907L is not defined!"
29032903
# endif
2904-
# endif // _LIBCPP_HAS_NO_CONCEPTS
2904+
# endif
29052905

29062906
# if !defined(_LIBCPP_VERSION)
29072907
# ifndef __cpp_lib_math_special_functions
@@ -4104,7 +4104,7 @@
41044104
# error "__cpp_lib_map_try_emplace should have the value 201411L in c++2b"
41054105
# endif
41064106

4107-
# if !_LIBCPP_HAS_NO_CONCEPTS
4107+
# if defined(__cpp_concepts) && __cpp_concepts >= 201907L
41084108
# ifndef __cpp_lib_math_constants
41094109
# error "__cpp_lib_math_constants should be defined in c++2b"
41104110
# endif
@@ -4115,7 +4115,7 @@
41154115
# ifdef __cpp_lib_math_constants
41164116
# error "__cpp_lib_math_constants should not be defined when defined(__cpp_concepts) && __cpp_concepts >= 201907L is not defined!"
41174117
# endif
4118-
# endif // !_LIBCPP_HAS_NO_CONCEPTS
4118+
# endif
41194119

41204120
# if !defined(_LIBCPP_VERSION)
41214121
# ifndef __cpp_lib_math_special_functions

libcxx/utils/generate_feature_test_macro_components.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ def add_version_header(tc):
422422
"values": { "c++20": 201907 },
423423
"headers": ["numbers"],
424424
"depends": "defined(__cpp_concepts) && __cpp_concepts >= 201907L",
425-
"internal_depends": "defined(__cpp_concepts) && __cpp_concepts >= 201907L",
425+
"internal_depends": "!defined(_LIBCPP_HAS_NO_CONCEPTS)",
426426
}, {
427427
"name": "__cpp_lib_math_special_functions",
428428
"values": { "c++17": 201603 },

0 commit comments

Comments
 (0)