Skip to content

[release/19.x][libc++] Adjust the version of __cpp_lib_ranges in C++20 mode #109324

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
Oct 15, 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 @@ -266,7 +266,7 @@ Status
---------------------------------------------------------- -----------------
``__cpp_lib_polymorphic_allocator`` ``201902L``
---------------------------------------------------------- -----------------
``__cpp_lib_ranges`` ``202207L``
``__cpp_lib_ranges`` ``202110L``
---------------------------------------------------------- -----------------
``__cpp_lib_remove_cvref`` ``201711L``
---------------------------------------------------------- -----------------
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/version
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ __cpp_lib_print 202207L <ostream> <print
__cpp_lib_quoted_string_io 201304L <iomanip>
__cpp_lib_ranges 202211L <algorithm> <functional> <iterator>
<memory> <ranges>
202207L // C++20
202110L // C++20
__cpp_lib_ranges_as_const 202207L <ranges>
__cpp_lib_ranges_as_rvalue 202207L <ranges>
__cpp_lib_ranges_chunk 202202L <ranges>
Expand Down Expand Up @@ -429,7 +429,7 @@ __cpp_lib_void_t 201411L <type_traits>
# if _LIBCPP_AVAILABILITY_HAS_PMR
# define __cpp_lib_polymorphic_allocator 201902L
# endif
# define __cpp_lib_ranges 202207L
# define __cpp_lib_ranges 202110L
# define __cpp_lib_remove_cvref 201711L
# if !defined(_LIBCPP_HAS_NO_THREADS) && _LIBCPP_AVAILABILITY_HAS_SYNC
# define __cpp_lib_semaphore 201907L
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
__cpp_lib_default_template_type_for_algorithm_values 202403L [C++26]
__cpp_lib_freestanding_algorithm 202311L [C++26]
__cpp_lib_parallel_algorithm 201603L [C++17]
__cpp_lib_ranges 202207L [C++20]
__cpp_lib_ranges 202110L [C++20]
202211L [C++23]
__cpp_lib_ranges_contains 202207L [C++23]
__cpp_lib_ranges_find_last 202207L [C++23]
Expand Down Expand Up @@ -245,8 +245,8 @@
# ifndef __cpp_lib_ranges
# error "__cpp_lib_ranges should be defined in c++20"
# endif
# if __cpp_lib_ranges != 202207L
# error "__cpp_lib_ranges should have the value 202207L in c++20"
# if __cpp_lib_ranges != 202110L
# error "__cpp_lib_ranges should have the value 202110L in c++20"
# endif

# ifdef __cpp_lib_ranges_contains
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
__cpp_lib_invoke_r 202106L [C++23]
__cpp_lib_move_only_function 202110L [C++23]
__cpp_lib_not_fn 201603L [C++17]
__cpp_lib_ranges 202207L [C++20]
__cpp_lib_ranges 202110L [C++20]
202211L [C++23]
__cpp_lib_reference_wrapper 202403L [C++26]
__cpp_lib_result_of_sfinae 201210L [C++14]
Expand Down Expand Up @@ -306,8 +306,8 @@
# ifndef __cpp_lib_ranges
# error "__cpp_lib_ranges should be defined in c++20"
# endif
# if __cpp_lib_ranges != 202207L
# error "__cpp_lib_ranges should have the value 202207L in c++20"
# if __cpp_lib_ranges != 202110L
# error "__cpp_lib_ranges should have the value 202110L in c++20"
# endif

# ifdef __cpp_lib_reference_wrapper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
__cpp_lib_move_iterator_concept 202207L [C++20]
__cpp_lib_nonmember_container_access 201411L [C++17]
__cpp_lib_null_iterators 201304L [C++14]
__cpp_lib_ranges 202207L [C++20]
__cpp_lib_ranges 202110L [C++20]
202211L [C++23]
__cpp_lib_ssize 201902L [C++20]
*/
Expand Down Expand Up @@ -198,8 +198,8 @@
# ifndef __cpp_lib_ranges
# error "__cpp_lib_ranges should be defined in c++20"
# endif
# if __cpp_lib_ranges != 202207L
# error "__cpp_lib_ranges should have the value 202207L in c++20"
# if __cpp_lib_ranges != 202110L
# error "__cpp_lib_ranges should have the value 202110L in c++20"
# endif

# ifndef __cpp_lib_ssize
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
__cpp_lib_make_unique 201304L [C++14]
__cpp_lib_out_ptr 202106L [C++23]
202311L [C++26]
__cpp_lib_ranges 202207L [C++20]
__cpp_lib_ranges 202110L [C++20]
202211L [C++23]
__cpp_lib_raw_memory_algorithms 201606L [C++17]
__cpp_lib_shared_ptr_arrays 201611L [C++17]
Expand Down Expand Up @@ -365,8 +365,8 @@
# ifndef __cpp_lib_ranges
# error "__cpp_lib_ranges should be defined in c++20"
# endif
# if __cpp_lib_ranges != 202207L
# error "__cpp_lib_ranges should have the value 202207L in c++20"
# if __cpp_lib_ranges != 202110L
# error "__cpp_lib_ranges should have the value 202110L in c++20"
# endif

# ifndef __cpp_lib_raw_memory_algorithms
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

/* Constant Value
__cpp_lib_default_template_type_for_algorithm_values 202403L [C++26]
__cpp_lib_ranges 202207L [C++20]
__cpp_lib_ranges 202110L [C++20]
202211L [C++23]
__cpp_lib_ranges_as_const 202207L [C++23]
__cpp_lib_ranges_as_rvalue 202207L [C++23]
Expand Down Expand Up @@ -193,8 +193,8 @@
# ifndef __cpp_lib_ranges
# error "__cpp_lib_ranges should be defined in c++20"
# endif
# if __cpp_lib_ranges != 202207L
# error "__cpp_lib_ranges should have the value 202207L in c++20"
# if __cpp_lib_ranges != 202110L
# error "__cpp_lib_ranges should have the value 202110L in c++20"
# endif

# ifdef __cpp_lib_ranges_as_const
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
__cpp_lib_polymorphic_allocator 201902L [C++20]
__cpp_lib_print 202207L [C++23]
__cpp_lib_quoted_string_io 201304L [C++14]
__cpp_lib_ranges 202207L [C++20]
__cpp_lib_ranges 202110L [C++20]
202211L [C++23]
__cpp_lib_ranges_as_const 202207L [C++23]
__cpp_lib_ranges_as_rvalue 202207L [C++23]
Expand Down Expand Up @@ -4132,8 +4132,8 @@
# ifndef __cpp_lib_ranges
# error "__cpp_lib_ranges should be defined in c++20"
# endif
# if __cpp_lib_ranges != 202207L
# error "__cpp_lib_ranges should have the value 202207L in c++20"
# if __cpp_lib_ranges != 202110L
# error "__cpp_lib_ranges should have the value 202110L in c++20"
# endif

# ifdef __cpp_lib_ranges_as_const
Expand Down
2 changes: 1 addition & 1 deletion libcxx/utils/generate_feature_test_macro_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ def add_version_header(tc):
{
"name": "__cpp_lib_ranges",
"values": {
"c++20": 202207,
"c++20": 202110, # P2415R2 What is a view?
"c++23": 202211, # P2602R2 Poison Pills are Too Toxic
# "c++23": 202302, # Relaxing Ranges Just A Smidge
# "c++26": 202406, # P2997R1 Removing the common reference requirement from the indirectly invocable concepts (already implemented as a DR)
Expand Down
Loading