Skip to content

[libc++] Define the __cpp_lib_atomic_ref feature test macro #98081

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
Jul 9, 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
2 changes: 1 addition & 1 deletion libcxx/docs/FeatureTestMacroTable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ Status
---------------------------------------------------------- -----------------
``__cpp_lib_atomic_lock_free_type_aliases`` ``201907L``
---------------------------------------------------------- -----------------
``__cpp_lib_atomic_ref`` *unimplemented*
``__cpp_lib_atomic_ref`` ``201806L``
---------------------------------------------------------- -----------------
``__cpp_lib_atomic_shared_ptr`` *unimplemented*
---------------------------------------------------------- -----------------
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/version
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ __cpp_lib_void_t 201411L <type_traits>
# define __cpp_lib_atomic_flag_test 201907L
// # define __cpp_lib_atomic_float 201711L
# define __cpp_lib_atomic_lock_free_type_aliases 201907L
// # define __cpp_lib_atomic_ref 201806L
# define __cpp_lib_atomic_ref 201806L
// # define __cpp_lib_atomic_shared_ptr 201711L
# define __cpp_lib_atomic_value_initialization 201911L
# if _LIBCPP_AVAILABILITY_HAS_SYNC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,17 +200,11 @@
# error "__cpp_lib_atomic_min_max should not be defined before c++26"
# endif

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

# if !defined(_LIBCPP_VERSION)
Expand Down Expand Up @@ -299,17 +293,11 @@
# error "__cpp_lib_atomic_min_max should not be defined before c++26"
# endif

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

# if !defined(_LIBCPP_VERSION)
Expand Down Expand Up @@ -407,17 +395,11 @@
# endif
# endif

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

# if !defined(_LIBCPP_VERSION)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3254,17 +3254,11 @@
# error "__cpp_lib_atomic_min_max should not be defined before c++26"
# endif

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

# if !defined(_LIBCPP_VERSION)
Expand Down Expand Up @@ -4675,17 +4669,11 @@
# error "__cpp_lib_atomic_min_max should not be defined before c++26"
# endif

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

# if !defined(_LIBCPP_VERSION)
Expand Down Expand Up @@ -6318,17 +6306,11 @@
# endif
# endif

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

# if !defined(_LIBCPP_VERSION)
Expand Down
1 change: 0 additions & 1 deletion libcxx/utils/generate_feature_test_macro_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ def add_version_header(tc):
"name": "__cpp_lib_atomic_ref",
"values": {"c++20": 201806},
"headers": ["atomic"],
"unimplemented": True,
},
{
"name": "__cpp_lib_atomic_shared_ptr",
Expand Down
Loading