Skip to content

Commit

Permalink
[libc++] Update status after Varna meeting.
Browse files Browse the repository at this point in the history
This updates:
- The status tables
- Feature test macros
- New headers for modules
The latter avoids forgetting about modules when implementing the feature
in a new header.

Reviewed By: #libc, philnik

Differential Revision: https://reviews.llvm.org/D153192
  • Loading branch information
mordante committed Jun 19, 2023
1 parent 72e5989 commit 3f05d04
Show file tree
Hide file tree
Showing 25 changed files with 1,982 additions and 577 deletions.
732 changes: 382 additions & 350 deletions libcxx/docs/FeatureTestMacroTable.rst

Large diffs are not rendered by default.

19 changes: 18 additions & 1 deletion libcxx/docs/Status/Cxx2cIssues.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
"Issue #","Issue Name","Meeting","Status","First released version","Labels"
"`2994 <https://wg21.link/LWG2994>`__","Needless UB for ``basic_string`` and ``basic_string_view``","Varna June 2023","","",""
"`3884 <https://wg21.link/LWG3884>`__","``flat_foo`` is missing allocator-extended copy/move constructors","Varna June 2023","","","|flat_containers|"
"`3885 <https://wg21.link/LWG3885>`__","``op`` should be in [zombie.names]","Varna June 2023","","",""
"`3887 <https://wg21.link/LWG3887>`__","Version macro for ``allocate_at_least``","Varna June 2023","","",""
"`3893 <https://wg21.link/LWG3893>`__","LWG 3661 broke ``atomic<shared_ptr<T>> a; a = nullptr;``","Varna June 2023","","",""
"`3894 <https://wg21.link/LWG3894>`__","``generator::promise_type::yield_value(ranges::elements_of<Rng, Alloc>)`` should not be ``noexcept``","Varna June 2023","","",""
"`3903 <https://wg21.link/LWG3903>`__","span destructor is redundantly noexcept","Varna June 2023","","",""
"`3904 <https://wg21.link/LWG3904>`__","``lazy_split_view::outer-iterator``'s const-converting constructor isn't setting ``trailing_empty_``","Varna June 2023","","","|ranges|"
"`3905 <https://wg21.link/LWG3905>`__","Type of ``std::fexcept_t``","Varna June 2023","","",""
"`3912 <https://wg21.link/LWG3912>`__","``enumerate_view::iterator::operator-`` should be ``noexcept``","Varna June 2023","","","|ranges|"
"`3914 <https://wg21.link/LWG3914>`__","Inconsistent template-head of ``ranges::enumerate_view``","Varna June 2023","","","|ranges|"
"`3915 <https://wg21.link/LWG3915>`__","Redundant paragraph about expression variations","Varna June 2023","","","|ranges|"
"`3925 <https://wg21.link/LWG3925>`__","Concept ``formattable``'s definition is incorrect","Varna June 2023","|In Progress|","","|format|"
"`3927 <https://wg21.link/LWG3927>`__","Unclear preconditions for ``operator[]`` for sequence containers","Varna June 2023","","",""
"`3935 <https://wg21.link/LWG3935>`__","``template<class X> constexpr complex& operator=(const complex<X>&)`` has no specification","Varna June 2023","","",""
"`3938 <https://wg21.link/LWG3938>`__","Cannot use ``std::expected`` monadic ops with move-only ``error_type``","Varna June 2023","","",""
"`3940 <https://wg21.link/LWG3940>`__","``std::expected<void, E>::value()`` also needs ``E`` to be copy constructible","Varna June 2023","","",""
"","","","","",""
"`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",""
"`3892 <https://wg21.link/LWG3892>`__","Incorrect formatting of nested ranges and tuples","Not Yet Adopted","|Complete|","17.0",""
"`3892 <https://wg21.link/LWG3892>`__","Incorrect formatting of nested ranges and tuples","Not Yet Adopted","|Complete|","17.0","|format|"
"","","","","",""
27 changes: 27 additions & 0 deletions libcxx/docs/Status/Cxx2cPapers.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,29 @@
"Paper #","Group","Paper Name","Meeting","Status","First released version","Labels"
"`P2497R0 <https://wg21.link/P2497R0>`__","LWG","Testing for success or failure of ``<charconv>`` functions","Varna June 2023","","",""
"`P2592R3 <https://wg21.link/P2592R3>`__","LWG","Hashing support for ``std::chrono`` value classes","Varna June 2023","","",""
"`P2587R3 <https://wg21.link/P2587R3>`__","LWG","``to_string`` or not ``to_string``","Varna June 2023","","","|format|"
"`P2562R1 <https://wg21.link/P2562R1>`__","LWG","``constexpr`` Stable Sorting","Varna June 2023","","",""
"`P2545R4 <https://wg21.link/P2545R4>`__","LWG","Read-Copy Update (RCU)","Varna June 2023","","",""
"`P2530R3 <https://wg21.link/P2530R3>`__","LWG","Hazard Pointers for C++26","Varna June 2023","","",""
"`P2538R1 <https://wg21.link/P2538R1>`__","LWG","ADL-proof ``std::projected``","Varna June 2023","","","|ranges|"
"`P2495R3 <https://wg21.link/P2495R3>`__","LWG","Interfacing ``stringstreams`` with ``string_view``","Varna June 2023","","",""
"`P2510R3 <https://wg21.link/P2510R3>`__","LWG","Formatting pointers","Varna June 2023","|In Progress|","","|format|"
"`P2198R7 <https://wg21.link/P2198R7>`__","LWG","Freestanding Feature-Test Macros and Implementation-Defined Extensions","Varna June 2023","","",""
"`P2338R4 <https://wg21.link/P2338R4>`__","LWG","Freestanding Library: Character primitives and the C library","Varna June 2023","","",""
"`P2013R5 <https://wg21.link/P2013R5>`__","LWG","Freestanding Language: Optional ``::operator new``","Varna June 2023","","",""
"`P2363R5 <https://wg21.link/P2363R5>`__","LWG","Extending associative containers with the remaining heterogeneous overloads","Varna June 2023","","",""
"`P1901R2 <https://wg21.link/P1901R2>`__","LWG","Enabling the Use of ``weak_ptr`` as Keys in Unordered Associative Containers","Varna June 2023","","",""
"`P1885R12 <https://wg21.link/P1885R12>`__","LWG","Naming Text Encodings to Demystify Them","Varna June 2023","","",""
"`P0792R14 <https://wg21.link/P0792R14>`__","LWG","``function_ref``: a type-erased callable reference","Varna June 2023","","",""
"`P2874R2 <https://wg21.link/P2874R2>`__","LWG","Mandating Annex D Require No More","Varna June 2023","","",""
"`P2757R3 <https://wg21.link/P2757R3>`__","LWG","Type-checking format args","Varna June 2023","","","|format|"
"`P2637R3 <https://wg21.link/P2637R3>`__","LWG","Member ``visit``","Varna June 2023","","","|format|"
"`P2641R4 <https://wg21.link/P2641R4>`__","CWG, LWG","Checking if a ``union`` alternative is active","Varna June 2023","","",""
"`P1759R6 <https://wg21.link/P1759R6>`__","LWG","Native handles and file streams","Varna June 2023","","",""
"`P2697R1 <https://wg21.link/P2697R1>`__","LWG","Interfacing ``bitset`` with ``string_view``","Varna June 2023","","",""
"`P1383R2 <https://wg21.link/P1383R2>`__","LWG","More ``constexpr`` for ``<cmath>`` and ``<complex>``","Varna June 2023","","",""
"`P2734R0 <https://wg21.link/P2734R0>`__","LWG","Adding the new SI prefixes","Varna June 2023","","",""
"`P2548R6 <https://wg21.link/P2548R6>`__","LWG","``copyable_function``","Varna June 2023","","",""
"`P2714R1 <https://wg21.link/P2714R1>`__","LWG","Bind front and back to NTTP callables","Varna June 2023","","",""
"`P2630R4 <https://wg21.link/P2630R4>`__","LWG","``submdspan``","Varna June 2023","","",""
"","","","","","",""
3 changes: 3 additions & 0 deletions libcxx/docs/Status/FormatIssues.csv
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Number,Name,Standard,Assignee,Status,First released version
"`P2675R1 <https://wg21.link/P2675R1>`__","``format``'s width estimation is too approximate and not forward compatible","C++23","Mark de Wever","|Complete|", Clang 17
"`P2572R1 <https://wg21.link/P2572R1>`__","``std::format`` fill character allowances","C++23","Mark de Wever","|Complete|", Clang 17
"`P2693R1 <https://wg21.link/P2693R1>`__","Formatting ``thread::id`` and ``stacktrace``","C++23","Mark de Wever","|In progress|"
"`P2510R3 <https://wg21.link/P2510R3>`__","Formatting pointers","C++26","Mark de Wever","|In Progress|",
"`P2757R3 <https://wg21.link/P2757R3>`__","Type-checking format args","C++26","","",
"`P2637R3 <https://wg21.link/P2637R3>`__","Member ``visit``","C++26","","",
`P1361 <https://wg21.link/P1361>`_,"Integration of chrono with text formatting","C++20",Mark de Wever,|In Progress|,
`P2372 <https://wg21.link/P2372>`__,"Fixing locale handling in chrono formatters","C++20",Mark de Wever,|In Progress|,
"`P2419R2 <https://wg21.link/P2419R2>`__","Clarify handling of encodings in localized formatting of chrono types","C++23",
40 changes: 37 additions & 3 deletions libcxx/include/version
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ __cpp_lib_array_constexpr 201811L <array> <iterato
__cpp_lib_as_const 201510L <utility>
__cpp_lib_associative_heterogeneous_erasure 202110L <map> <set> <unordered_map>
<unordered_set>
__cpp_lib_associative_heterogeneous_insertion 202306L <map> <set> <unordered_map>
<unordered_set>
__cpp_lib_assume_aligned 201811L <memory>
__cpp_lib_atomic_flag_test 201907L <atomic>
__cpp_lib_atomic_float 201711L <atomic>
Expand All @@ -38,10 +40,13 @@ __cpp_lib_atomic_shared_ptr 201711L <atomic>
__cpp_lib_atomic_value_initialization 201911L <atomic> <memory>
__cpp_lib_atomic_wait 201907L <atomic>
__cpp_lib_barrier 201907L <barrier>
__cpp_lib_bind_back 202202L <functional>
__cpp_lib_bind_front 201907L <functional>
__cpp_lib_bind_back 202306L <functional>
202202L // C++23
__cpp_lib_bind_front 202306L <functional>
201907L // C++20
__cpp_lib_bit_cast 201806L <bit>
__cpp_lib_bitops 201907L <bit>
__cpp_lib_bitset 202306L <bitset>
__cpp_lib_bool_constant 201505L <type_traits>
__cpp_lib_bounded_array_traits 201902L <type_traits>
__cpp_lib_boyer_moore_searcher 201603L <functional>
Expand Down Expand Up @@ -72,6 +77,7 @@ __cpp_lib_constexpr_tuple 201811L <tuple>
__cpp_lib_constexpr_typeinfo 202106L <typeinfo>
__cpp_lib_constexpr_utility 201811L <utility>
__cpp_lib_constexpr_vector 201907L <vector>
__cpp_lib_copyable_function 202306L <functional>
__cpp_lib_coroutine 201902L <coroutine>
__cpp_lib_destroying_delete 201806L <new>
__cpp_lib_enable_shared_from_this 201603L <memory>
Expand All @@ -88,11 +94,14 @@ __cpp_lib_format 202106L <format>
__cpp_lib_format_ranges 202207L <format>
__cpp_lib_formatters 202302L <stacktrace> <thread>
__cpp_lib_forward_like 202207L <utility>
__cpp_lib_fstream_native_handle 202306L <fstream>
__cpp_lib_function_ref 202306L <functional>
__cpp_lib_gcd_lcm 201606L <numeric>
__cpp_lib_generic_associative_lookup 201304L <map> <set>
__cpp_lib_generic_unordered_lookup 201811L <unordered_map> <unordered_set>
__cpp_lib_hardware_interference_size 201703L <new>
__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_int_pow2 202002L <bit>
Expand Down Expand Up @@ -155,7 +164,9 @@ __cpp_lib_ranges_to_container 202202L <deque> <forward
<set> <stack> <string>
<unordered_map> <unordered_set> <vector>
__cpp_lib_ranges_zip 202110L <ranges> <tuple> <utility>
__cpp_lib_ratio 202306L <ratio>
__cpp_lib_raw_memory_algorithms 201606L <memory>
__cpp_lib_rcu 202306L <rcu>
__cpp_lib_reference_from_temporary 202202L <type_traits>
__cpp_lib_remove_cvref 201711L <type_traits>
__cpp_lib_result_of_sfinae 201210L <functional> <type_traits>
Expand All @@ -170,10 +181,12 @@ __cpp_lib_shared_ptr_weak_type 201606L <memory>
__cpp_lib_shared_timed_mutex 201402L <shared_mutex>
__cpp_lib_shift 201806L <algorithm>
__cpp_lib_smart_ptr_for_overwrite 202002L <memory>
__cpp_lib_smart_ptr_owner_equality 202306L <memory>
__cpp_lib_source_location 201907L <source_location>
__cpp_lib_span 202002L <span>
__cpp_lib_spanstream 202106L <spanstream>
__cpp_lib_ssize 201902L <iterator>
__cpp_lib_sstream_from_string_view 202306L <sstream>
__cpp_lib_stacktrace 202011L <stacktrace>
__cpp_lib_starts_ends_with 201711L <string> <string_view>
__cpp_lib_stdatomic_h 202011L <stdatomic.h>
Expand All @@ -182,11 +195,14 @@ __cpp_lib_string_resize_and_overwrite 202110L <string>
__cpp_lib_string_udls 201304L <string>
__cpp_lib_string_view 201803L <string> <string_view>
201606L // C++17
__cpp_lib_submdspan 202306L <mdspan>
__cpp_lib_syncbuf 201803L <syncstream>
__cpp_lib_text_encoding 202306L <text_encoding>
__cpp_lib_three_way_comparison 201907L <compare>
__cpp_lib_to_address 201711L <memory>
__cpp_lib_to_array 201907L <array>
__cpp_lib_to_chars 201611L <charconv>
__cpp_lib_to_string 202306L <string>
__cpp_lib_to_underlying 202102L <utility>
__cpp_lib_transformation_trait_aliases 201304L <type_traits>
__cpp_lib_transparent_operators 201510L <functional> <memory>
Expand All @@ -201,6 +217,7 @@ __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 @@ -423,12 +440,29 @@ __cpp_lib_void_t 201411L <type_traits>
# define __cpp_lib_stdatomic_h 202011L
# define __cpp_lib_string_contains 202011L
# define __cpp_lib_string_resize_and_overwrite 202110L
// # define __cpp_lib_to_string 202306L
# define __cpp_lib_to_underlying 202102L
# define __cpp_lib_unreachable 202202L
#endif

#if _LIBCPP_STD_VER >= 26

// # define __cpp_lib_associative_heterogeneous_insertion 202306L
# undef __cpp_lib_bind_back
// # define __cpp_lib_bind_back 202306L
# undef __cpp_lib_bind_front
# define __cpp_lib_bind_front 202306L
// # define __cpp_lib_bitset 202306L
// # define __cpp_lib_copyable_function 202306L
// # define __cpp_lib_fstream_native_handle 202306L
// # define __cpp_lib_function_ref 202306L
// # define __cpp_lib_hazard_pointer 202306L
// # define __cpp_lib_ratio 202306L
// # define __cpp_lib_rcu 202306L
// # define __cpp_lib_smart_ptr_owner_equality 202306L
// # define __cpp_lib_sstream_from_string_view 202306L
// # define __cpp_lib_submdspan 202306L
// # define __cpp_lib_text_encoding 202306L
// # define __cpp_lib_within_lifetime 202306L
#endif

// clang-format on
Expand Down
3 changes: 3 additions & 0 deletions libcxx/modules/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ set(LIBCXX_SOURCES_MODULE_STD
std/functional.cppm
std/future.cppm
std/generator.cppm
std/hazard_pointer.cppm
std/initializer_list.cppm
std/iomanip.cppm
std/ios.cppm
Expand Down Expand Up @@ -83,6 +84,7 @@ set(LIBCXX_SOURCES_MODULE_STD
std/random.cppm
std/ranges.cppm
std/ratio.cppm
std/rcu.cppm
std/regex.cppm
std/scoped_allocator.cppm
std/semaphore.cppm
Expand All @@ -104,6 +106,7 @@ set(LIBCXX_SOURCES_MODULE_STD
std/strstream.cppm
std/syncstream.cppm
std/system_error.cppm
std/text_encoding.cppm
std/thread.cppm
std/tuple.cppm
std/type_traits.cppm
Expand Down
3 changes: 3 additions & 0 deletions libcxx/modules/std.cppm
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export import :fstream;
export import :functional;
export import :future;
export import :generator;
export import :hazard_pointer;
export import :initializer_list;
export import :iomanip;
export import :ios;
Expand All @@ -86,6 +87,7 @@ export import :queue;
export import :random;
export import :ranges;
export import :ratio;
export import :rcu;
export import :regex;
export import :scoped_allocator;
export import :semaphore;
Expand All @@ -106,6 +108,7 @@ export import :string_view;
export import :strstream;
export import :syncstream;
export import :system_error;
export import :text_encoding;
export import :thread;
export import :tuple;
export import :type_traits;
Expand Down
30 changes: 30 additions & 0 deletions libcxx/modules/std/hazard_pointer.cppm
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

module;
#if __has_include(<hazard_pointer>)
# error "include this header unconditionally and uncomment the exported symbols"
# include <hazard_pointer>
#endif

export module std:hazard_pointer;
export namespace std {
#if 0
# if _LIBCPP_STD_VER >= 23
// 4.1.3, class template hazard_pointer_obj_base
using std::hazard_pointer_obj_base;
// 4.1.4, class hazard_pointer
using std::hazard_pointer;
// 4.1.5, Construct non-empty hazard_pointer
using std::make_hazard_pointer;
// 4.1.6, Hazard pointer swap
using std::swap;
# endif // _LIBCPP_STD_VER >= 23
#endif
} // namespace std
29 changes: 29 additions & 0 deletions libcxx/modules/std/rcu.cppm
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

module;
#if __has_include(<rcu>)
# error "include this header unconditionally and uncomment the exported symbols"
# include <rcu>
#endif

export module std:rcu;
export namespace std {
#if 0
# if _LIBCPP_STD_VER >= 23
// 2.2.3, class template rcu_obj_base using std::rcu_obj_base;
// 2.2.4, class rcu_domain
using std::rcu_domain;
using std::rcu_default_domain();
using std::rcu_barrier;
using std::rcu_retire;
using std::rcu_synchronize;
# endif // _LIBCPP_STD_VER >= 23
#endif
} // namespace std
26 changes: 26 additions & 0 deletions libcxx/modules/std/text_encoding.cppm
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

module;
#if __has_include(<text_encoding>)
# error "include this header unconditionally and uncomment the exported symbols"
# include <text_encoding>
#endif

export module std:text_encoding;
export namespace std {
#if 0
# if _LIBCPP_STD_VER >= 23
using std::text_encoding;

// hash support
using std::hash;
# endif // _LIBCPP_STD_VER >= 23
#endif
} // namespace std
Loading

0 comments on commit 3f05d04

Please sign in to comment.