diff --git a/libcxx/include/__config b/libcxx/include/__config --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -26,6 +26,10 @@ #define _LIBCPP_VERSION 15000 +#ifdef _LIBCPP_ABI_UNSTABLE +# define _LIBCPP_ABI_VERSION 2 +#endif + #ifndef _LIBCPP_ABI_VERSION # define _LIBCPP_ABI_VERSION 1 #endif @@ -44,7 +48,7 @@ # elif __cplusplus <= 202002L # define _LIBCPP_STD_VER 20 # else -# define _LIBCPP_STD_VER 21 // current year, or date of c++2b ratification +# define _LIBCPP_STD_VER 22 // current year, or date of c++2b ratification # endif #endif // _LIBCPP_STD_VER @@ -60,7 +64,7 @@ // ... add new file formats here ... #endif -#if defined(_LIBCPP_ABI_UNSTABLE) || _LIBCPP_ABI_VERSION >= 2 +#if _LIBCPP_ABI_VERSION >= 2 // Change short string representation so that string data starts at offset 0, // improving its alignment in some cases. # define _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT @@ -151,7 +155,7 @@ # define _LIBCPP_ABI_ALWAYS_USE_CXX11_NULLPTR #endif -#if defined(_LIBCPP_BUILDING_LIBRARY) || defined(_LIBCPP_ABI_UNSTABLE) || _LIBCPP_ABI_VERSION >= 2 +#if defined(_LIBCPP_BUILDING_LIBRARY) || _LIBCPP_ABI_VERSION >= 2 // Enable additional explicit instantiations of iostreams components. This // reduces the number of weak definitions generated in programs that use // iostreams by providing a single strong definition in the shared library. @@ -837,7 +841,7 @@ #define _LIBCPP_END_NAMESPACE_FILESYSTEM \ _LIBCPP_END_NAMESPACE_STD } } -#define _VSTD_FS _VSTD::__fs::filesystem +#define _VSTD_FS std::__fs::filesystem #if __has_attribute(__enable_if__) # define _LIBCPP_PREFERRED_OVERLOAD __attribute__ ((__enable_if__(true, ""))) @@ -1020,13 +1024,13 @@ # define _LIBCPP_DEPRECATED_IN_CXX11 #endif -#if _LIBCPP_STD_VER >= 14 +#if _LIBCPP_STD_VER > 11 # define _LIBCPP_DEPRECATED_IN_CXX14 _LIBCPP_DEPRECATED #else # define _LIBCPP_DEPRECATED_IN_CXX14 #endif -#if _LIBCPP_STD_VER >= 17 +#if _LIBCPP_STD_VER > 14 # define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED #else # define _LIBCPP_DEPRECATED_IN_CXX17 @@ -1287,7 +1291,7 @@ #endif // Use a function like macro to imply that it must be followed by a semicolon -#if __cplusplus > 201402L && __has_cpp_attribute(fallthrough) +#if _LIBCPP_STD_VER > 14 && __has_cpp_attribute(fallthrough) # define _LIBCPP_FALLTHROUGH() [[fallthrough]] #elif __has_cpp_attribute(clang::fallthrough) # define _LIBCPP_FALLTHROUGH() [[clang::fallthrough]]