Skip to content

[libc++][test] __cpp_lib_within_lifetime -> __cpp_lib_is_within_lifetime #91896

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 1 commit into from
May 16, 2024
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
4 changes: 2 additions & 2 deletions libcxx/docs/FeatureTestMacroTable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,8 @@ Status
---------------------------------------------------------- -----------------
``__cpp_lib_hazard_pointer`` *unimplemented*
---------------------------------------------------------- -----------------
``__cpp_lib_is_within_lifetime`` *unimplemented*
---------------------------------------------------------- -----------------
``__cpp_lib_linalg`` *unimplemented*
---------------------------------------------------------- -----------------
``__cpp_lib_out_ptr`` *unimplemented*
Expand Down Expand Up @@ -465,7 +467,5 @@ Status
``__cpp_lib_to_chars`` *unimplemented*
---------------------------------------------------------- -----------------
``__cpp_lib_tuple_like`` *unimplemented*
---------------------------------------------------------- -----------------
``__cpp_lib_within_lifetime`` *unimplemented*
========================================================== =================

4 changes: 2 additions & 2 deletions libcxx/include/version
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ __cpp_lib_is_null_pointer 201309L <type_traits>
__cpp_lib_is_pointer_interconvertible 201907L <type_traits>
__cpp_lib_is_scoped_enum 202011L <type_traits>
__cpp_lib_is_swappable 201603L <type_traits>
__cpp_lib_is_within_lifetime 202306L <type_traits>
__cpp_lib_jthread 201911L <stop_token> <thread>
__cpp_lib_latch 201907L <latch>
__cpp_lib_launder 201606L <new>
Expand Down Expand Up @@ -251,7 +252,6 @@ __cpp_lib_unreachable 202202L <utility>
__cpp_lib_unwrap_ref 201811L <functional>
__cpp_lib_variant 202102L <variant>
__cpp_lib_void_t 201411L <type_traits>
__cpp_lib_within_lifetime 202306L <type_traits>

*/

Expand Down Expand Up @@ -520,6 +520,7 @@ __cpp_lib_within_lifetime 202306L <type_traits>
// # define __cpp_lib_function_ref 202306L
// # define __cpp_lib_generate_random 202403L
// # define __cpp_lib_hazard_pointer 202306L
// # define __cpp_lib_is_within_lifetime 202306L
// # define __cpp_lib_linalg 202311L
# undef __cpp_lib_out_ptr
// # define __cpp_lib_out_ptr 202311L
Expand All @@ -538,7 +539,6 @@ __cpp_lib_within_lifetime 202306L <type_traits>
// # define __cpp_lib_to_chars 202306L
# undef __cpp_lib_tuple_like
// # define __cpp_lib_tuple_like 202311L
// # define __cpp_lib_within_lifetime 202306L
#endif

// clang-format on
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
__cpp_lib_is_pointer_interconvertible 201907L [C++20]
__cpp_lib_is_scoped_enum 202011L [C++23]
__cpp_lib_is_swappable 201603L [C++17]
__cpp_lib_is_within_lifetime 202306L [C++26]
__cpp_lib_logical_traits 201510L [C++17]
__cpp_lib_reference_from_temporary 202202L [C++23]
__cpp_lib_remove_cvref 201711L [C++20]
Expand All @@ -38,7 +39,6 @@
__cpp_lib_type_identity 201806L [C++20]
__cpp_lib_type_trait_variable_templates 201510L [C++17]
__cpp_lib_void_t 201411L [C++17]
__cpp_lib_within_lifetime 202306L [C++26]
*/

#include <type_traits>
Expand Down Expand Up @@ -102,6 +102,10 @@
# error "__cpp_lib_is_swappable should not be defined before c++17"
# endif

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

# ifdef __cpp_lib_logical_traits
# error "__cpp_lib_logical_traits should not be defined before c++17"
# endif
Expand Down Expand Up @@ -134,10 +138,6 @@
# error "__cpp_lib_void_t should not be defined before c++17"
# endif

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

#elif TEST_STD_VER == 14

# ifdef __cpp_lib_bool_constant
Expand Down Expand Up @@ -205,6 +205,10 @@
# error "__cpp_lib_is_swappable should not be defined before c++17"
# endif

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

# ifdef __cpp_lib_logical_traits
# error "__cpp_lib_logical_traits should not be defined before c++17"
# endif
Expand Down Expand Up @@ -243,10 +247,6 @@
# error "__cpp_lib_void_t should not be defined before c++17"
# endif

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

#elif TEST_STD_VER == 17

# ifndef __cpp_lib_bool_constant
Expand Down Expand Up @@ -329,6 +329,10 @@
# error "__cpp_lib_is_swappable should have the value 201603L in c++17"
# endif

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

# ifndef __cpp_lib_logical_traits
# error "__cpp_lib_logical_traits should be defined in c++17"
# endif
Expand Down Expand Up @@ -376,10 +380,6 @@
# error "__cpp_lib_void_t should have the value 201411L in c++17"
# endif

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

#elif TEST_STD_VER == 20

# ifndef __cpp_lib_bool_constant
Expand Down Expand Up @@ -489,6 +489,10 @@
# error "__cpp_lib_is_swappable should have the value 201603L in c++20"
# endif

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

# ifndef __cpp_lib_logical_traits
# error "__cpp_lib_logical_traits should be defined in c++20"
# endif
Expand Down Expand Up @@ -542,10 +546,6 @@
# error "__cpp_lib_void_t should have the value 201411L in c++20"
# endif

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

#elif TEST_STD_VER == 23

# ifndef __cpp_lib_bool_constant
Expand Down Expand Up @@ -658,6 +658,10 @@
# error "__cpp_lib_is_swappable should have the value 201603L in c++23"
# endif

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

# ifndef __cpp_lib_logical_traits
# error "__cpp_lib_logical_traits should be defined in c++23"
# endif
Expand Down Expand Up @@ -720,10 +724,6 @@
# error "__cpp_lib_void_t should have the value 201411L in c++23"
# endif

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

#elif TEST_STD_VER > 23

# ifndef __cpp_lib_bool_constant
Expand Down Expand Up @@ -836,6 +836,19 @@
# error "__cpp_lib_is_swappable should have the value 201603L in c++26"
# endif

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

# ifndef __cpp_lib_logical_traits
# error "__cpp_lib_logical_traits should be defined in c++26"
# endif
Expand Down Expand Up @@ -898,18 +911,5 @@
# error "__cpp_lib_void_t should have the value 201411L in c++26"
# endif

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

#endif // TEST_STD_VER > 23

Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
__cpp_lib_is_pointer_interconvertible 201907L [C++20]
__cpp_lib_is_scoped_enum 202011L [C++23]
__cpp_lib_is_swappable 201603L [C++17]
__cpp_lib_is_within_lifetime 202306L [C++26]
__cpp_lib_jthread 201911L [C++20]
__cpp_lib_latch 201907L [C++20]
__cpp_lib_launder 201606L [C++17]
Expand Down Expand Up @@ -232,7 +233,6 @@
__cpp_lib_unwrap_ref 201811L [C++20]
__cpp_lib_variant 202102L [C++17]
__cpp_lib_void_t 201411L [C++17]
__cpp_lib_within_lifetime 202306L [C++26]
*/

#include <version>
Expand Down Expand Up @@ -680,6 +680,10 @@
# error "__cpp_lib_is_swappable should not be defined before c++17"
# endif

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

# ifdef __cpp_lib_jthread
# error "__cpp_lib_jthread should not be defined before c++20"
# endif
Expand Down Expand Up @@ -1060,10 +1064,6 @@
# error "__cpp_lib_void_t should not be defined before c++17"
# endif

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

#elif TEST_STD_VER == 14

# ifdef __cpp_lib_adaptor_iterator_pair_constructor
Expand Down Expand Up @@ -1530,6 +1530,10 @@
# error "__cpp_lib_is_swappable should not be defined before c++17"
# endif

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

# ifdef __cpp_lib_jthread
# error "__cpp_lib_jthread should not be defined before c++20"
# endif
Expand Down Expand Up @@ -1958,10 +1962,6 @@
# error "__cpp_lib_void_t should not be defined before c++17"
# endif

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

#elif TEST_STD_VER == 17

# ifdef __cpp_lib_adaptor_iterator_pair_constructor
Expand Down Expand Up @@ -2518,6 +2518,10 @@
# error "__cpp_lib_is_swappable should have the value 201603L in c++17"
# endif

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

# ifdef __cpp_lib_jthread
# error "__cpp_lib_jthread should not be defined before c++20"
# endif
Expand Down Expand Up @@ -3054,10 +3058,6 @@
# error "__cpp_lib_void_t should have the value 201411L in c++17"
# endif

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

#elif TEST_STD_VER == 20

# ifdef __cpp_lib_adaptor_iterator_pair_constructor
Expand Down Expand Up @@ -3797,6 +3797,10 @@
# error "__cpp_lib_is_swappable should have the value 201603L in c++20"
# endif

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

# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN) && (!defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_SYNC)
# ifndef __cpp_lib_jthread
# error "__cpp_lib_jthread should be defined in c++20"
Expand Down Expand Up @@ -4438,10 +4442,6 @@
# error "__cpp_lib_void_t should have the value 201411L in c++20"
# endif

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

#elif TEST_STD_VER == 23

# ifndef __cpp_lib_adaptor_iterator_pair_constructor
Expand Down Expand Up @@ -5259,6 +5259,10 @@
# error "__cpp_lib_is_swappable should have the value 201603L in c++23"
# endif

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

# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN) && (!defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_SYNC)
# ifndef __cpp_lib_jthread
# error "__cpp_lib_jthread should be defined in c++23"
Expand Down Expand Up @@ -6056,10 +6060,6 @@
# error "__cpp_lib_void_t should have the value 201411L in c++23"
# endif

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

#elif TEST_STD_VER > 23

# ifndef __cpp_lib_adaptor_iterator_pair_constructor
Expand Down Expand Up @@ -7042,6 +7042,19 @@
# error "__cpp_lib_is_swappable should have the value 201603L in c++26"
# endif

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

# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN) && (!defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_SYNC)
# ifndef __cpp_lib_jthread
# error "__cpp_lib_jthread should be defined in c++26"
Expand Down Expand Up @@ -7911,18 +7924,5 @@
# error "__cpp_lib_void_t should have the value 201411L in c++26"
# endif

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

#endif // TEST_STD_VER > 23

Loading
Loading