Skip to content

[libc++] Mark P2845R8 __cpp_lib_format_path and P2587R3 __cpp_lib_to_string as C++26 #93255

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 3 commits into from
May 28, 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
8 changes: 4 additions & 4 deletions libcxx/docs/FeatureTestMacroTable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,6 @@ Status
---------------------------------------------------------- -----------------
``__cpp_lib_expected`` ``202211L``
---------------------------------------------------------- -----------------
``__cpp_lib_format_path`` *unimplemented*
---------------------------------------------------------- -----------------
``__cpp_lib_format_ranges`` ``202207L``
---------------------------------------------------------- -----------------
``__cpp_lib_formatters`` *unimplemented*
Expand Down Expand Up @@ -386,8 +384,6 @@ Status
---------------------------------------------------------- -----------------
``__cpp_lib_string_resize_and_overwrite`` ``202110L``
---------------------------------------------------------- -----------------
``__cpp_lib_to_string`` *unimplemented*
---------------------------------------------------------- -----------------
``__cpp_lib_to_underlying`` ``202102L``
---------------------------------------------------------- -----------------
``__cpp_lib_tuple_like`` *unimplemented*
Expand All @@ -412,6 +408,8 @@ Status
---------------------------------------------------------- -----------------
``__cpp_lib_default_template_type_for_algorithm_values`` *unimplemented*
---------------------------------------------------------- -----------------
``__cpp_lib_format_path`` *unimplemented*
---------------------------------------------------------- -----------------
``__cpp_lib_freestanding_algorithm`` *unimplemented*
---------------------------------------------------------- -----------------
``__cpp_lib_freestanding_array`` *unimplemented*
Expand Down Expand Up @@ -466,6 +464,8 @@ Status
---------------------------------------------------------- -----------------
``__cpp_lib_to_chars`` *unimplemented*
---------------------------------------------------------- -----------------
``__cpp_lib_to_string`` *unimplemented*
---------------------------------------------------------- -----------------
``__cpp_lib_tuple_like`` *unimplemented*
========================================================== =================

4 changes: 2 additions & 2 deletions libcxx/include/version
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,6 @@ __cpp_lib_void_t 201411L <type_traits>
# define __cpp_lib_constexpr_typeinfo 202106L
# define __cpp_lib_containers_ranges 202202L
# define __cpp_lib_expected 202211L
// # define __cpp_lib_format_path 202403L
# define __cpp_lib_format_ranges 202207L
// # define __cpp_lib_formatters 202302L
# define __cpp_lib_forward_like 202207L
Expand Down Expand Up @@ -490,7 +489,6 @@ __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_tuple_like 202207L
# define __cpp_lib_unreachable 202202L
Expand All @@ -506,6 +504,7 @@ __cpp_lib_void_t 201411L <type_traits>
// # define __cpp_lib_copyable_function 202306L
// # define __cpp_lib_debugging 202311L
// # define __cpp_lib_default_template_type_for_algorithm_values 202403L
// # define __cpp_lib_format_path 202403L
// # define __cpp_lib_freestanding_algorithm 202311L
// # define __cpp_lib_freestanding_array 202311L
// # define __cpp_lib_freestanding_cstring 202306L
Expand Down Expand Up @@ -537,6 +536,7 @@ __cpp_lib_void_t 201411L <type_traits>
// # define __cpp_lib_text_encoding 202306L
# undef __cpp_lib_to_chars
// # define __cpp_lib_to_chars 202306L
// # define __cpp_lib_to_string 202306L
# undef __cpp_lib_tuple_like
// # define __cpp_lib_tuple_like 202311L
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/* Constant Value
__cpp_lib_char8_t 201907L [C++20]
__cpp_lib_filesystem 201703L [C++17]
__cpp_lib_format_path 202403L [C++23]
__cpp_lib_format_path 202403L [C++26]
*/

#include <filesystem>
Expand All @@ -37,7 +37,7 @@
# endif

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

#elif TEST_STD_VER == 14
Expand All @@ -51,7 +51,7 @@
# endif

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

#elif TEST_STD_VER == 17
Expand All @@ -74,7 +74,7 @@
# endif

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

#elif TEST_STD_VER == 20
Expand Down Expand Up @@ -106,7 +106,7 @@
# endif

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

#elif TEST_STD_VER == 23
Expand Down Expand Up @@ -137,17 +137,8 @@
# endif
# endif

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

#elif TEST_STD_VER > 23
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
__cpp_lib_string_udls 201304L [C++14]
__cpp_lib_string_view 201606L [C++17]
201803L [C++20]
__cpp_lib_to_string 202306L [C++23]
__cpp_lib_to_string 202306L [C++26]
*/

#include <string>
Expand Down Expand Up @@ -86,7 +86,7 @@
# endif

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

#elif TEST_STD_VER == 14
Expand Down Expand Up @@ -143,7 +143,7 @@
# endif

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

#elif TEST_STD_VER == 17
Expand Down Expand Up @@ -209,7 +209,7 @@
# endif

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

#elif TEST_STD_VER == 20
Expand Down Expand Up @@ -293,7 +293,7 @@
# endif

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

#elif TEST_STD_VER == 23
Expand Down Expand Up @@ -385,17 +385,8 @@
# error "__cpp_lib_string_view should have the value 201803L in c++23"
# endif

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

#elif TEST_STD_VER > 23
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
__cpp_lib_expected 202211L [C++23]
__cpp_lib_filesystem 201703L [C++17]
__cpp_lib_format 202106L [C++20]
__cpp_lib_format_path 202403L [C++23]
__cpp_lib_format_path 202403L [C++26]
__cpp_lib_format_ranges 202207L [C++23]
__cpp_lib_format_uchar 202311L [C++20]
__cpp_lib_formatters 202302L [C++23]
Expand Down Expand Up @@ -216,7 +216,7 @@
__cpp_lib_to_array 201907L [C++20]
__cpp_lib_to_chars 201611L [C++17]
202306L [C++26]
__cpp_lib_to_string 202306L [C++23]
__cpp_lib_to_string 202306L [C++26]
__cpp_lib_to_underlying 202102L [C++23]
__cpp_lib_transformation_trait_aliases 201304L [C++14]
__cpp_lib_transparent_operators 201210L [C++14]
Expand Down Expand Up @@ -513,7 +513,7 @@
# endif

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

# ifdef __cpp_lib_format_ranges
Expand Down Expand Up @@ -1005,7 +1005,7 @@
# endif

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

# ifdef __cpp_lib_to_underlying
Expand Down Expand Up @@ -1348,7 +1348,7 @@
# endif

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

# ifdef __cpp_lib_format_ranges
Expand Down Expand Up @@ -1891,7 +1891,7 @@
# endif

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

# ifdef __cpp_lib_to_underlying
Expand Down Expand Up @@ -2303,7 +2303,7 @@
# endif

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

# ifdef __cpp_lib_format_ranges
Expand Down Expand Up @@ -2972,7 +2972,7 @@
# endif

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

# ifdef __cpp_lib_to_underlying
Expand Down Expand Up @@ -3543,7 +3543,7 @@
# endif

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

# ifdef __cpp_lib_format_ranges
Expand Down Expand Up @@ -4350,7 +4350,7 @@
# endif

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

# ifdef __cpp_lib_to_underlying
Expand Down Expand Up @@ -4971,17 +4971,8 @@
# endif
# endif

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

# ifndef __cpp_lib_format_ranges
Expand Down Expand Up @@ -5943,17 +5934,8 @@
# endif
# endif

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

# ifndef __cpp_lib_to_underlying
Expand Down
4 changes: 2 additions & 2 deletions libcxx/utils/generate_feature_test_macro_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ def add_version_header(tc):
},
{
"name": "__cpp_lib_format_path",
"values": {"c++23": 202403}, # P2845R8: Formatting of std::filesystem::path
"values": {"c++26": 202403}, # P2845R8: Formatting of std::filesystem::path
"headers": ["filesystem"],
"unimplemented": True,
},
Expand Down Expand Up @@ -1270,7 +1270,7 @@ def add_version_header(tc):
},
{
"name": "__cpp_lib_to_string",
"values": {"c++23": 202306}, # P2587R3 to_string or not to_string
"values": {"c++26": 202306}, # P2587R3 to_string or not to_string
"headers": ["string"],
"unimplemented": True,
},
Expand Down
Loading