Skip to content

Commit

Permalink
[libc++] Update status after the St. Louis meeting. (#97951)
Browse files Browse the repository at this point in the history
This updates:
- The status tables
- Feature test macros
- New headers for modules
  • Loading branch information
mordante authored Jul 8, 2024
1 parent 09a275e commit 2dadf8d
Show file tree
Hide file tree
Showing 15 changed files with 488 additions and 8 deletions.
12 changes: 12 additions & 0 deletions libcxx/docs/FeatureTestMacroTable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,8 @@ Status
---------------------------------------------------------- -----------------
``__cpp_lib_bitset`` ``202306L``
---------------------------------------------------------- -----------------
``__cpp_lib_constexpr_new`` *unimplemented*
---------------------------------------------------------- -----------------
``__cpp_lib_constrained_equality`` *unimplemented*
---------------------------------------------------------- -----------------
``__cpp_lib_copyable_function`` *unimplemented*
Expand Down Expand Up @@ -436,12 +438,20 @@ Status
---------------------------------------------------------- -----------------
``__cpp_lib_hazard_pointer`` *unimplemented*
---------------------------------------------------------- -----------------
``__cpp_lib_inplace_vector`` *unimplemented*
---------------------------------------------------------- -----------------
``__cpp_lib_is_virtual_base_of`` *unimplemented*
---------------------------------------------------------- -----------------
``__cpp_lib_is_within_lifetime`` *unimplemented*
---------------------------------------------------------- -----------------
``__cpp_lib_linalg`` *unimplemented*
---------------------------------------------------------- -----------------
``__cpp_lib_optional_range_support`` *unimplemented*
---------------------------------------------------------- -----------------
``__cpp_lib_out_ptr`` *unimplemented*
---------------------------------------------------------- -----------------
``__cpp_lib_philox_engine`` *unimplemented*
---------------------------------------------------------- -----------------
``__cpp_lib_ranges_concat`` *unimplemented*
---------------------------------------------------------- -----------------
``__cpp_lib_ratio`` ``202306L``
Expand All @@ -452,6 +462,8 @@ Status
---------------------------------------------------------- -----------------
``__cpp_lib_saturation_arithmetic`` ``202311L``
---------------------------------------------------------- -----------------
``__cpp_lib_senders`` *unimplemented*
---------------------------------------------------------- -----------------
``__cpp_lib_smart_ptr_owner_equality`` *unimplemented*
---------------------------------------------------------- -----------------
``__cpp_lib_span_at`` ``202311L``
Expand Down
1 change: 1 addition & 0 deletions libcxx/docs/Status/Cxx2c.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Paper Status
.. [#note-P2510R3] This paper is applied as DR against C++20. (MSVC STL and libstdc++ will do the same.)
.. [#note-P3142R0] This paper is applied as DR against C++23. (MSVC STL and libstdc++ will do the same.)
.. [#note-P2944R3] Implemented comparisons for ``reference_wrapper`` only.
.. [#note-P2422R1] Libc++ keeps the ``nodiscard`` attributes as a conforming extension.
.. _issues-status-cxx2c:

Expand Down
15 changes: 14 additions & 1 deletion libcxx/docs/Status/Cxx2cIssues.csv
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,20 @@
"`4053 <https://wg21.link/LWG4053>`__","Unary call to ``std::views::repeat`` does not decay the argument","Tokyo March 2024","|Complete|","19.0","|ranges|"
"`4054 <https://wg21.link/LWG4054>`__","Repeating a ``repeat_view`` should repeat the view","Tokyo March 2024","|Complete|","19.0","|ranges|"
"","","","","",""
"`3944 <https://wg21.link/LWG3944>`__","Formatters converting sequences of ``char`` to sequences of ``wchar_t``","St. Louis June 2024","","","|format|"
"`4060 <https://wg21.link/LWG4060>`__","``submdspan`` preconditions do not forbid creating invalid pointer","St. Louis June 2024","","",""
"`4061 <https://wg21.link/LWG4061>`__","Should ``std::basic_format_context`` be default-constructible/copyable/movable?","St. Louis June 2024","","","|format|"
"`4071 <https://wg21.link/LWG4071>`__","``reference_wrapper`` comparisons are not SFINAE-friendly","St. Louis June 2024","|Complete|","19.0",""
"`4074 <https://wg21.link/LWG4074>`__","``compatible-joinable-ranges`` is underconstrained","St. Louis June 2024","","","|ranges|"
"`4076 <https://wg21.link/LWG4076>`__","``concat_view`` should be freestanding","St. Louis June 2024","","",""
"`4079 <https://wg21.link/LWG4079>`__","Missing Preconditions in ``concat_view::iterator``\`s conversion constructor","St. Louis June 2024","","","|ranges|"
"`4082 <https://wg21.link/LWG4082>`__","``views::concat(r)`` is well-formed when ``r`` is an ``output_range``","St. Louis June 2024","","","|ranges|"
"`4083 <https://wg21.link/LWG4083>`__","``views::as_rvalue`` should reject non-input ranges","St. Louis June 2024","","","|ranges|"
"`4096 <https://wg21.link/LWG4096>`__","``views::iota(views::iota(0))`` should be rejected","St. Louis June 2024","","","|ranges|"
"`4098 <https://wg21.link/LWG4098>`__","``views::adjacent<0>`` should reject non-forward ranges","St. Louis June 2024","","","|ranges|"
"`4105 <https://wg21.link/LWG4105>`__","``ranges::ends_with``\`s Returns misses difference casting","St. Louis June 2024","","","|ranges|"
"`4106 <https://wg21.link/LWG4106>`__","``basic_format_args`` should not be default-constructible","St. Louis June 2024","","","|format|"
"","","","","",""
"`3343 <https://wg21.link/LWG3343>`__","Ordering of calls to ``unlock()`` and ``notify_all()`` in Effects element of ``notify_all_at_thread_exit()`` should be reversed","Not Yet Adopted","|Complete|","16.0",""
"XXXX","","The sys_info range should be affected by save","Not Yet Adopted","|Complete|","19.0"
"`4071 <https://wg21.link/LWG4071>`__","","``reference_wrapper`` comparisons are not SFINAE-friendly","Not Yet Adopted","|Complete|","19.0"
"","","","","",""
13 changes: 13 additions & 0 deletions libcxx/docs/Status/Cxx2cPapers.csv
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,16 @@
"`P2642R6 <https://wg21.link/P2642R6>`__","LWG","Padded ``mdspan`` layouts","Tokyo March 2024","","",""
"`P3029R1 <https://wg21.link/P3029R1>`__","LWG","Better ``mdspan``'s CTAD","Tokyo March 2024","|Complete|","19.0",""
"","","","","","",""
"`P2747R2 <https://wg21.link/P2747R2>`__","CWG","``constexpr`` placement new","St. Louis June 2024","","",""
"`P2997R1 <https://wg21.link/P2997R1>`__","LWG","Removing the common reference requirement from the indirectly invocable concepts","St. Louis June 2024","","",""
"`P2389R2 <https://wg21.link/P2389R2>`__","LWG","``dextents`` Index Type Parameter","St. Louis June 2024","","",""
"`P3168R2 <https://wg21.link/P3168R2>`__","LWG","Give ``std::optional`` Range Support","St. Louis June 2024","","","|ranges|"
"`P3217R0 <https://wg21.link/P3217R0>`__","LWG","Adjoints to 'Enabling list-initialization for algorithms': find_last","St. Louis June 2024","","",""
"`P2985R0 <https://wg21.link/P2985R0>`__","LWG","A type trait for detecting virtual base classes","St. Louis June 2024","","",""
"`P0843R14 <https://wg21.link/P0843R14>`__","LWG","``inplace_vector``","St. Louis June 2024","","",""
"`P3235R3 <https://wg21.link/P3235R3>`__","LWG","``std::print`` more types faster with less memory","St. Louis June 2024","","","|format| |DR|"
"`P2968R2 <https://wg21.link/P2968R2>`__","LWG","Make ``std::ignore`` a first-class object","St. Louis June 2024","","",""
"`P2075R6 <https://wg21.link/P2075R6>`__","LWG","Philox as an extension of the C++ RNG engines","St. Louis June 2024","","",""
"`P2422R1 <https://wg21.link/P2422R1>`__","LWG","Remove ``nodiscard`` annotations from the standard library specification","St. Louis June 2024","|Complete| [#note-P2422R1]_","19.0",""
"`P2300R10 <https://wg21.link/P2300R10>`__","LWG","``std::execution``","St. Louis June 2024","","",""
"","","","","","",""
12 changes: 12 additions & 0 deletions libcxx/include/version
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ __cpp_lib_constexpr_functional 201907L <functional>
__cpp_lib_constexpr_iterator 201811L <iterator>
__cpp_lib_constexpr_memory 202202L <memory>
201811L // C++20
__cpp_lib_constexpr_new 202406L <new>
__cpp_lib_constexpr_numeric 201911L <numeric>
__cpp_lib_constexpr_string 201907L <string>
__cpp_lib_constexpr_string_view 201811L <string_view>
Expand Down Expand Up @@ -125,6 +126,7 @@ __cpp_lib_has_unique_object_representations 201606L <type_traits>
__cpp_lib_hazard_pointer 202306L <hazard_pointer>
__cpp_lib_hypot 201603L <cmath>
__cpp_lib_incomplete_container_elements 201505L <forward_list> <list> <vector>
__cpp_lib_inplace_vector 202406L <inplace_vector>
__cpp_lib_int_pow2 202002L <bit>
__cpp_lib_integer_comparison_functions 202002L <utility>
__cpp_lib_integer_sequence 201304L <utility>
Expand All @@ -143,6 +145,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_virtual_base_of 202406L <type_traits>
__cpp_lib_is_within_lifetime 202306L <type_traits>
__cpp_lib_jthread 201911L <stop_token> <thread>
__cpp_lib_latch 201907L <latch>
Expand Down Expand Up @@ -170,9 +173,11 @@ __cpp_lib_not_fn 201603L <functional>
__cpp_lib_null_iterators 201304L <iterator>
__cpp_lib_optional 202110L <optional>
201606L // C++17
__cpp_lib_optional_range_support 202406L <optional>
__cpp_lib_out_ptr 202311L <memory>
202106L // C++23
__cpp_lib_parallel_algorithm 201603L <algorithm> <numeric>
__cpp_lib_philox_engine 202406L <random>
__cpp_lib_polymorphic_allocator 201902L <memory_resource>
__cpp_lib_print 202207L <ostream> <print>
__cpp_lib_quoted_string_io 201304L <iomanip>
Expand Down Expand Up @@ -203,6 +208,7 @@ __cpp_lib_sample 201603L <algorithm>
__cpp_lib_saturation_arithmetic 202311L <numeric>
__cpp_lib_scoped_lock 201703L <mutex>
__cpp_lib_semaphore 201907L <semaphore>
__cpp_lib_senders 202406L <execution>
__cpp_lib_shared_mutex 201505L <shared_mutex>
__cpp_lib_shared_ptr_arrays 201707L <memory>
201611L // C++17
Expand Down Expand Up @@ -500,6 +506,7 @@ __cpp_lib_void_t 201411L <type_traits>
# undef __cpp_lib_bind_front
# define __cpp_lib_bind_front 202306L
# define __cpp_lib_bitset 202306L
// # define __cpp_lib_constexpr_new 202406L
// # define __cpp_lib_constrained_equality 202403L
// # define __cpp_lib_copyable_function 202306L
// # define __cpp_lib_debugging 202311L
Expand All @@ -519,15 +526,20 @@ __cpp_lib_void_t 201411L <type_traits>
// # define __cpp_lib_function_ref 202306L
// # define __cpp_lib_generate_random 202403L
// # define __cpp_lib_hazard_pointer 202306L
// # define __cpp_lib_inplace_vector 202406L
// # define __cpp_lib_is_virtual_base_of 202406L
// # define __cpp_lib_is_within_lifetime 202306L
// # define __cpp_lib_linalg 202311L
// # define __cpp_lib_optional_range_support 202406L
# undef __cpp_lib_out_ptr
// # define __cpp_lib_out_ptr 202311L
// # define __cpp_lib_philox_engine 202406L
// # define __cpp_lib_ranges_concat 202403L
# define __cpp_lib_ratio 202306L
// # define __cpp_lib_rcu 202306L
# define __cpp_lib_reference_wrapper 202403L
# define __cpp_lib_saturation_arithmetic 202311L
// # define __cpp_lib_senders 202406L
// # define __cpp_lib_smart_ptr_owner_equality 202306L
# define __cpp_lib_span_at 202311L
# define __cpp_lib_span_initializer_list 202311L
Expand Down
3 changes: 3 additions & 0 deletions libcxx/modules/std.compat.cppm.in
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ module;
# if __has_include(<hazard_pointer>)
# error "please update the header information for <hazard_pointer> in headers_not_available in utils/libcxx/header_information.py"
# endif // __has_include(<hazard_pointer>)
# if __has_include(<inplace_vector>)
# error "please update the header information for <inplace_vector> in headers_not_available in utils/libcxx/header_information.py"
# endif // __has_include(<inplace_vector>)
# if __has_include(<linalg>)
# error "please update the header information for <linalg> in headers_not_available in utils/libcxx/header_information.py"
# endif // __has_include(<linalg>)
Expand Down
3 changes: 3 additions & 0 deletions libcxx/modules/std.cppm.in
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ module;
# if __has_include(<hazard_pointer>)
# error "please update the header information for <hazard_pointer> in headers_not_available in utils/libcxx/header_information.py"
# endif // __has_include(<hazard_pointer>)
# if __has_include(<inplace_vector>)
# error "please update the header information for <inplace_vector> in headers_not_available in utils/libcxx/header_information.py"
# endif // __has_include(<inplace_vector>)
# if __has_include(<linalg>)
# error "please update the header information for <linalg> in headers_not_available in utils/libcxx/header_information.py"
# endif // __has_include(<linalg>)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
/* Constant Value
__cpp_lib_execution 201603L [C++17]
201902L [C++20]
__cpp_lib_senders 202406L [C++26]
*/

#include <execution>
Expand All @@ -29,12 +30,20 @@
# error "__cpp_lib_execution should not be defined before c++17"
# endif

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

#elif TEST_STD_VER == 14

# ifdef __cpp_lib_execution
# error "__cpp_lib_execution should not be defined before c++17"
# endif

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

#elif TEST_STD_VER == 17

# if !defined(_LIBCPP_VERSION)
Expand All @@ -50,6 +59,10 @@
# endif
# endif

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

#elif TEST_STD_VER == 20

# if !defined(_LIBCPP_VERSION)
Expand All @@ -65,6 +78,10 @@
# endif
# endif

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

#elif TEST_STD_VER == 23

# if !defined(_LIBCPP_VERSION)
Expand All @@ -80,6 +97,10 @@
# endif
# endif

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

#elif TEST_STD_VER > 23

# if !defined(_LIBCPP_VERSION)
Expand All @@ -95,5 +116,18 @@
# endif
# endif

# if !defined(_LIBCPP_VERSION)
# ifndef __cpp_lib_senders
# error "__cpp_lib_senders should be defined in c++26"
# endif
# if __cpp_lib_senders != 202406L
# error "__cpp_lib_senders should have the value 202406L in c++26"
# endif
# else // _LIBCPP_VERSION
# ifdef __cpp_lib_senders
# error "__cpp_lib_senders 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 @@ -16,6 +16,7 @@
// Test the feature test macros defined by <new>

/* Constant Value
__cpp_lib_constexpr_new 202406L [C++26]
__cpp_lib_destroying_delete 201806L [C++20]
__cpp_lib_hardware_interference_size 201703L [C++17]
__cpp_lib_launder 201606L [C++17]
Expand All @@ -26,6 +27,10 @@

#if TEST_STD_VER < 14

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

# ifdef __cpp_lib_destroying_delete
# error "__cpp_lib_destroying_delete should not be defined before c++20"
# endif
Expand All @@ -40,6 +45,10 @@

#elif TEST_STD_VER == 14

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

# ifdef __cpp_lib_destroying_delete
# error "__cpp_lib_destroying_delete should not be defined before c++20"
# endif
Expand All @@ -54,6 +63,10 @@

#elif TEST_STD_VER == 17

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

# ifdef __cpp_lib_destroying_delete
# error "__cpp_lib_destroying_delete should not be defined before c++20"
# endif
Expand All @@ -80,6 +93,10 @@

#elif TEST_STD_VER == 20

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

# if TEST_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L
# ifndef __cpp_lib_destroying_delete
# error "__cpp_lib_destroying_delete should be defined in c++20"
Expand Down Expand Up @@ -115,6 +132,10 @@

#elif TEST_STD_VER == 23

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

# if TEST_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L
# ifndef __cpp_lib_destroying_delete
# error "__cpp_lib_destroying_delete should be defined in c++23"
Expand Down Expand Up @@ -150,6 +171,19 @@

#elif TEST_STD_VER > 23

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

# if TEST_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L
# ifndef __cpp_lib_destroying_delete
# error "__cpp_lib_destroying_delete should be defined in c++26"
Expand Down
Loading

0 comments on commit 2dadf8d

Please sign in to comment.