diff --git a/libcxx/docs/FeatureTestMacroTable.rst b/libcxx/docs/FeatureTestMacroTable.rst index 7cd20acc6ff4a0..82cfa76b744b77 100644 --- a/libcxx/docs/FeatureTestMacroTable.rst +++ b/libcxx/docs/FeatureTestMacroTable.rst @@ -452,6 +452,8 @@ Status ---------------------------------------------------------- ----------------- ``__cpp_lib_philox_engine`` *unimplemented* ---------------------------------------------------------- ----------------- + ``__cpp_lib_ranges`` ``202406L`` + ---------------------------------------------------------- ----------------- ``__cpp_lib_ranges_concat`` *unimplemented* ---------------------------------------------------------- ----------------- ``__cpp_lib_ratio`` ``202306L`` diff --git a/libcxx/include/version b/libcxx/include/version index 1f66bce40df8a2..0c5cec87b7b011 100644 --- a/libcxx/include/version +++ b/libcxx/include/version @@ -181,8 +181,9 @@ __cpp_lib_philox_engine 202406L __cpp_lib_polymorphic_allocator 201902L __cpp_lib_print 202207L __cpp_lib_quoted_string_io 201304L -__cpp_lib_ranges 202207L +__cpp_lib_ranges 202406L + 202207L // C++20 __cpp_lib_ranges_as_const 202207L __cpp_lib_ranges_as_rvalue 202207L __cpp_lib_ranges_chunk 202202L @@ -534,6 +535,8 @@ __cpp_lib_void_t 201411L # undef __cpp_lib_out_ptr // # define __cpp_lib_out_ptr 202311L // # define __cpp_lib_philox_engine 202406L +# undef __cpp_lib_ranges +# define __cpp_lib_ranges 202406L // # define __cpp_lib_ranges_concat 202403L # define __cpp_lib_ratio 202306L // # define __cpp_lib_rcu 202306L diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp index 8ccd252115ac82..f9be4ef6ec1f6f 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp @@ -22,6 +22,7 @@ __cpp_lib_freestanding_algorithm 202311L [C++26] __cpp_lib_parallel_algorithm 201603L [C++17] __cpp_lib_ranges 202207L [C++20] + 202406L [C++26] __cpp_lib_ranges_contains 202207L [C++23] __cpp_lib_ranges_starts_ends_with 202106L [C++23] __cpp_lib_robust_nonmodifying_seq_ops 201304L [C++14] @@ -401,8 +402,8 @@ # ifndef __cpp_lib_ranges # error "__cpp_lib_ranges should be defined in c++26" # endif -# if __cpp_lib_ranges != 202207L -# error "__cpp_lib_ranges should have the value 202207L in c++26" +# if __cpp_lib_ranges != 202406L +# error "__cpp_lib_ranges should have the value 202406L in c++26" # endif # ifndef __cpp_lib_ranges_contains diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.compile.pass.cpp index 27e76e5b2b05a3..e4eb94aad60c59 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.compile.pass.cpp @@ -28,6 +28,7 @@ __cpp_lib_move_only_function 202110L [C++23] __cpp_lib_not_fn 201603L [C++17] __cpp_lib_ranges 202207L [C++20] + 202406L [C++26] __cpp_lib_reference_wrapper 202403L [C++26] __cpp_lib_result_of_sfinae 201210L [C++14] __cpp_lib_transparent_operators 201210L [C++14] @@ -531,8 +532,8 @@ # ifndef __cpp_lib_ranges # error "__cpp_lib_ranges should be defined in c++26" # endif -# if __cpp_lib_ranges != 202207L -# error "__cpp_lib_ranges should have the value 202207L in c++26" +# if __cpp_lib_ranges != 202406L +# error "__cpp_lib_ranges should have the value 202406L in c++26" # endif # ifndef __cpp_lib_reference_wrapper diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/iterator.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/iterator.version.compile.pass.cpp index 700907ce9bb071..4e29f3db51c3b7 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/iterator.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/iterator.version.compile.pass.cpp @@ -24,6 +24,7 @@ __cpp_lib_nonmember_container_access 201411L [C++17] __cpp_lib_null_iterators 201304L [C++14] __cpp_lib_ranges 202207L [C++20] + 202406L [C++26] __cpp_lib_ssize 201902L [C++20] */ @@ -313,8 +314,8 @@ # ifndef __cpp_lib_ranges # error "__cpp_lib_ranges should be defined in c++26" # endif -# if __cpp_lib_ranges != 202207L -# error "__cpp_lib_ranges should have the value 202207L in c++26" +# if __cpp_lib_ranges != 202406L +# error "__cpp_lib_ranges should have the value 202406L in c++26" # endif # ifndef __cpp_lib_ssize diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.compile.pass.cpp index 45d9271faa5783..e44474a4c0affb 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.compile.pass.cpp @@ -29,6 +29,7 @@ __cpp_lib_out_ptr 202106L [C++23] 202311L [C++26] __cpp_lib_ranges 202207L [C++20] + 202406L [C++26] __cpp_lib_raw_memory_algorithms 201606L [C++17] __cpp_lib_shared_ptr_arrays 201611L [C++17] 201707L [C++20] @@ -638,8 +639,8 @@ # ifndef __cpp_lib_ranges # error "__cpp_lib_ranges should be defined in c++26" # endif -# if __cpp_lib_ranges != 202207L -# error "__cpp_lib_ranges should have the value 202207L in c++26" +# if __cpp_lib_ranges != 202406L +# error "__cpp_lib_ranges should have the value 202406L in c++26" # endif # ifndef __cpp_lib_raw_memory_algorithms diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.compile.pass.cpp index 30feacd796d8e1..6c558eafbc3337 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.compile.pass.cpp @@ -18,6 +18,7 @@ /* Constant Value __cpp_lib_default_template_type_for_algorithm_values 202403L [C++26] __cpp_lib_ranges 202207L [C++20] + 202406L [C++26] __cpp_lib_ranges_as_const 202207L [C++23] __cpp_lib_ranges_as_rvalue 202207L [C++23] __cpp_lib_ranges_chunk 202202L [C++23] @@ -364,8 +365,8 @@ # ifndef __cpp_lib_ranges # error "__cpp_lib_ranges should be defined in c++26" # endif -# if __cpp_lib_ranges != 202207L -# error "__cpp_lib_ranges should have the value 202207L in c++26" +# if __cpp_lib_ranges != 202406L +# error "__cpp_lib_ranges should have the value 202406L in c++26" # endif # if !defined(_LIBCPP_VERSION) diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp index aa5ff80afb56a2..a39425c968e3e9 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp @@ -166,6 +166,7 @@ __cpp_lib_print 202207L [C++23] __cpp_lib_quoted_string_io 201304L [C++14] __cpp_lib_ranges 202207L [C++20] + 202406L [C++26] __cpp_lib_ranges_as_const 202207L [C++23] __cpp_lib_ranges_as_rvalue 202207L [C++23] __cpp_lib_ranges_chunk 202202L [C++23] @@ -7456,8 +7457,8 @@ # ifndef __cpp_lib_ranges # error "__cpp_lib_ranges should be defined in c++26" # endif -# if __cpp_lib_ranges != 202207L -# error "__cpp_lib_ranges should have the value 202207L in c++26" +# if __cpp_lib_ranges != 202406L +# error "__cpp_lib_ranges should have the value 202406L in c++26" # endif # if !defined(_LIBCPP_VERSION) diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py index 7bc11aa401829d..317e5a3391417c 100755 --- a/libcxx/utils/generate_feature_test_macro_components.py +++ b/libcxx/utils/generate_feature_test_macro_components.py @@ -993,7 +993,7 @@ def add_version_header(tc): "name": "__cpp_lib_ranges", "values": { "c++20": 202207, - # "c++26": 202406, # P2997R1 Removing the common reference requirement from the indirectly invocable concepts + "c++26": 202406, # P2997R1 Removing the common reference requirement from the indirectly invocable concepts }, "headers": ["algorithm", "functional", "iterator", "memory", "ranges"], },