Skip to content

[libc++] Set __cpp_lib_smart_ptr_for_overwrite #114700

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
2 changes: 1 addition & 1 deletion libcxx/docs/FeatureTestMacroTable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ Status
---------------------------------------------------------- -----------------
``__cpp_lib_shift`` ``201806L``
---------------------------------------------------------- -----------------
``__cpp_lib_smart_ptr_for_overwrite`` *unimplemented*
``__cpp_lib_smart_ptr_for_overwrite`` ``202002L``
---------------------------------------------------------- -----------------
``__cpp_lib_source_location`` ``201907L``
---------------------------------------------------------- -----------------
Expand Down
4 changes: 2 additions & 2 deletions libcxx/docs/Status/Cxx20Papers.csv
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"`P0972R0 <https://wg21.link/P0972R0>`__","<chrono> ``zero()``\ , ``min()``\ , and ``max()``\ should be noexcept","2018-11 (San Diego)","|Complete|","8",""
"`P1006R1 <https://wg21.link/P1006R1>`__","Constexpr in std::pointer_traits","2018-11 (San Diego)","|Complete|","8",""
"`P1007R3 <https://wg21.link/P1007R3>`__","``std::assume_aligned``\ ","2018-11 (San Diego)","|Complete|","15",""
"`P1020R1 <https://wg21.link/P1020R1>`__","Smart pointer creation with default initialization","2018-11 (San Diego)","|Complete|","16",""
"`P1020R1 <https://wg21.link/P1020R1>`__","Smart pointer creation with default initialization","2018-11 (San Diego)","|Complete|","16","The feature-test macro was not set until LLVM 20."
"`P1032R1 <https://wg21.link/P1032R1>`__","Misc constexpr bits","2018-11 (San Diego)","|Complete|","13",""
"`P1085R2 <https://wg21.link/P1085R2>`__","Should Span be Regular?","2018-11 (San Diego)","|Complete|","8",""
"`P1123R0 <https://wg21.link/P1123R0>`__","Editorial Guidance for merging P0019r8 and P0528r3","2018-11 (San Diego)","","",""
Expand Down Expand Up @@ -177,7 +177,7 @@
"`P1963R0 <https://wg21.link/P1963R0>`__","Fixing US 313","2020-02 (Prague)","","",""
"`P1964R2 <https://wg21.link/P1964R2>`__","Wording for boolean-testable","2020-02 (Prague)","|Complete|","13",""
"`P1970R2 <https://wg21.link/P1970R2>`__","Consistency for size() functions: Add ranges::ssize","2020-02 (Prague)","|Complete|","15",""
"`P1973R1 <https://wg21.link/P1973R1>`__","Rename ""_default_init"" Functions, Rev1","2020-02 (Prague)","|Complete|","16",""
"`P1973R1 <https://wg21.link/P1973R1>`__","Rename ""_default_init"" Functions, Rev1","2020-02 (Prague)","|Complete|","16","The feature-test macro was not set until LLVM 20."
"`P1976R2 <https://wg21.link/P1976R2>`__","Fixed-size span construction from dynamic range","2020-02 (Prague)","|Complete|","11",""
"`P1981R0 <https://wg21.link/P1981R0>`__","Rename leap to leap_second","2020-02 (Prague)","|Complete|","19",""
"`P1982R0 <https://wg21.link/P1982R0>`__","Rename link to time_zone_link","2020-02 (Prague)","|Complete|","19",""
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/version
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ __cpp_lib_void_t 201411L <type_traits>
# undef __cpp_lib_shared_ptr_arrays
# define __cpp_lib_shared_ptr_arrays 201707L
# define __cpp_lib_shift 201806L
// # define __cpp_lib_smart_ptr_for_overwrite 202002L
# define __cpp_lib_smart_ptr_for_overwrite 202002L
# define __cpp_lib_source_location 201907L
# define __cpp_lib_span 202002L
# define __cpp_lib_ssize 201902L
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,17 +390,11 @@
# error "__cpp_lib_shared_ptr_weak_type should have the value 201606L in c++20"
# endif

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

# ifdef __cpp_lib_smart_ptr_owner_equality
Expand Down Expand Up @@ -521,17 +515,11 @@
# error "__cpp_lib_shared_ptr_weak_type should have the value 201606L in c++23"
# endif

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

# ifdef __cpp_lib_smart_ptr_owner_equality
Expand Down Expand Up @@ -652,17 +640,11 @@
# error "__cpp_lib_shared_ptr_weak_type should have the value 201606L in c++26"
# endif

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

# if !defined(_LIBCPP_VERSION)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4344,17 +4344,11 @@
# error "__cpp_lib_shift should have the value 201806L in c++20"
# endif

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

# ifdef __cpp_lib_smart_ptr_owner_equality
Expand Down Expand Up @@ -5929,17 +5923,11 @@
# error "__cpp_lib_shift should have the value 201806L in c++23"
# endif

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

# ifdef __cpp_lib_smart_ptr_owner_equality
Expand Down Expand Up @@ -7829,17 +7817,11 @@
# error "__cpp_lib_shift should have the value 201806L in c++26"
# endif

# if !defined(_LIBCPP_VERSION)
# ifndef __cpp_lib_smart_ptr_for_overwrite
# error "__cpp_lib_smart_ptr_for_overwrite should be defined in c++26"
# endif
# if __cpp_lib_smart_ptr_for_overwrite != 202002L
# error "__cpp_lib_smart_ptr_for_overwrite should have the value 202002L in c++26"
# endif
# else // _LIBCPP_VERSION
# ifdef __cpp_lib_smart_ptr_for_overwrite
# error "__cpp_lib_smart_ptr_for_overwrite should not be defined because it is unimplemented in libc++!"
# endif
# ifndef __cpp_lib_smart_ptr_for_overwrite
# error "__cpp_lib_smart_ptr_for_overwrite should be defined in c++26"
# endif
# if __cpp_lib_smart_ptr_for_overwrite != 202002L
# error "__cpp_lib_smart_ptr_for_overwrite should have the value 202002L 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 @@ -1196,7 +1196,6 @@ def add_version_header(tc):
"name": "__cpp_lib_smart_ptr_for_overwrite",
"values": {"c++20": 202002},
"headers": ["memory"],
"unimplemented": True,
},
{
"name": "__cpp_lib_smart_ptr_owner_equality",
Expand Down
Loading