Skip to content

Commit b7c0a40

Browse files
committed
[libc++] Add FTM for constexpr vector
It looks like we forgot to set the FTM when adding constexpr vector support. Reviewed By: ldionne, #libc Spies: libcxx-commits, arichardson Differential Revision: https://reviews.llvm.org/D137729
1 parent a61a9a7 commit b7c0a40

File tree

5 files changed

+22
-47
lines changed

5 files changed

+22
-47
lines changed

libcxx/docs/FeatureTestMacroTable.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ Status
222222
------------------------------------------------- -----------------
223223
``__cpp_lib_constexpr_utility`` ``201811L``
224224
------------------------------------------------- -----------------
225-
``__cpp_lib_constexpr_vector`` *unimplemented*
225+
``__cpp_lib_constexpr_vector`` ``201907L``
226226
------------------------------------------------- -----------------
227227
``__cpp_lib_coroutine`` ``201902L``
228228
------------------------------------------------- -----------------

libcxx/include/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ __cpp_lib_void_t 201411L <type_traits>
326326
# define __cpp_lib_constexpr_string_view 201811L
327327
# define __cpp_lib_constexpr_tuple 201811L
328328
# define __cpp_lib_constexpr_utility 201811L
329-
// # define __cpp_lib_constexpr_vector 201907L
329+
# define __cpp_lib_constexpr_vector 201907L
330330
# define __cpp_lib_coroutine 201902L
331331
# if _LIBCPP_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L
332332
# define __cpp_lib_destroying_delete 201806L

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

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -123,17 +123,11 @@
123123
# error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++20"
124124
# endif
125125

126-
# if !defined(_LIBCPP_VERSION)
127-
# ifndef __cpp_lib_constexpr_vector
128-
# error "__cpp_lib_constexpr_vector should be defined in c++20"
129-
# endif
130-
# if __cpp_lib_constexpr_vector != 201907L
131-
# error "__cpp_lib_constexpr_vector should have the value 201907L in c++20"
132-
# endif
133-
# else // _LIBCPP_VERSION
134-
# ifdef __cpp_lib_constexpr_vector
135-
# error "__cpp_lib_constexpr_vector should not be defined because it is unimplemented in libc++!"
136-
# endif
126+
# ifndef __cpp_lib_constexpr_vector
127+
# error "__cpp_lib_constexpr_vector should be defined in c++20"
128+
# endif
129+
# if __cpp_lib_constexpr_vector != 201907L
130+
# error "__cpp_lib_constexpr_vector should have the value 201907L in c++20"
137131
# endif
138132

139133
# ifndef __cpp_lib_erase_if
@@ -170,17 +164,11 @@
170164
# error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++2b"
171165
# endif
172166

173-
# if !defined(_LIBCPP_VERSION)
174-
# ifndef __cpp_lib_constexpr_vector
175-
# error "__cpp_lib_constexpr_vector should be defined in c++2b"
176-
# endif
177-
# if __cpp_lib_constexpr_vector != 201907L
178-
# error "__cpp_lib_constexpr_vector should have the value 201907L in c++2b"
179-
# endif
180-
# else // _LIBCPP_VERSION
181-
# ifdef __cpp_lib_constexpr_vector
182-
# error "__cpp_lib_constexpr_vector should not be defined because it is unimplemented in libc++!"
183-
# endif
167+
# ifndef __cpp_lib_constexpr_vector
168+
# error "__cpp_lib_constexpr_vector should be defined in c++2b"
169+
# endif
170+
# if __cpp_lib_constexpr_vector != 201907L
171+
# error "__cpp_lib_constexpr_vector should have the value 201907L in c++2b"
184172
# endif
185173

186174
# ifndef __cpp_lib_erase_if

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

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2772,17 +2772,11 @@
27722772
# error "__cpp_lib_constexpr_utility should have the value 201811L in c++20"
27732773
# endif
27742774

2775-
# if !defined(_LIBCPP_VERSION)
2776-
# ifndef __cpp_lib_constexpr_vector
2777-
# error "__cpp_lib_constexpr_vector should be defined in c++20"
2778-
# endif
2779-
# if __cpp_lib_constexpr_vector != 201907L
2780-
# error "__cpp_lib_constexpr_vector should have the value 201907L in c++20"
2781-
# endif
2782-
# else // _LIBCPP_VERSION
2783-
# ifdef __cpp_lib_constexpr_vector
2784-
# error "__cpp_lib_constexpr_vector should not be defined because it is unimplemented in libc++!"
2785-
# endif
2775+
# ifndef __cpp_lib_constexpr_vector
2776+
# error "__cpp_lib_constexpr_vector should be defined in c++20"
2777+
# endif
2778+
# if __cpp_lib_constexpr_vector != 201907L
2779+
# error "__cpp_lib_constexpr_vector should have the value 201907L in c++20"
27862780
# endif
27872781

27882782
# ifndef __cpp_lib_coroutine
@@ -4015,17 +4009,11 @@
40154009
# error "__cpp_lib_constexpr_utility should have the value 201811L in c++2b"
40164010
# endif
40174011

4018-
# if !defined(_LIBCPP_VERSION)
4019-
# ifndef __cpp_lib_constexpr_vector
4020-
# error "__cpp_lib_constexpr_vector should be defined in c++2b"
4021-
# endif
4022-
# if __cpp_lib_constexpr_vector != 201907L
4023-
# error "__cpp_lib_constexpr_vector should have the value 201907L in c++2b"
4024-
# endif
4025-
# else // _LIBCPP_VERSION
4026-
# ifdef __cpp_lib_constexpr_vector
4027-
# error "__cpp_lib_constexpr_vector should not be defined because it is unimplemented in libc++!"
4028-
# endif
4012+
# ifndef __cpp_lib_constexpr_vector
4013+
# error "__cpp_lib_constexpr_vector should be defined in c++2b"
4014+
# endif
4015+
# if __cpp_lib_constexpr_vector != 201907L
4016+
# error "__cpp_lib_constexpr_vector should have the value 201907L in c++2b"
40294017
# endif
40304018

40314019
# ifndef __cpp_lib_coroutine

libcxx/utils/generate_feature_test_macro_components.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@ def add_version_header(tc):
277277
"name": "__cpp_lib_constexpr_vector",
278278
"values": { "c++20": 201907 },
279279
"headers": ["vector"],
280-
"unimplemented": True,
281280
}, {
282281
"name": "__cpp_lib_coroutine",
283282
"values": { "c++20": 201902 },

0 commit comments

Comments
 (0)