diff --git a/libcxx/docs/ReleaseNotes.rst b/libcxx/docs/ReleaseNotes.rst --- a/libcxx/docs/ReleaseNotes.rst +++ b/libcxx/docs/ReleaseNotes.rst @@ -69,6 +69,8 @@ - ```` no longer includes ```` in any C++ version (it was prevously included in C++17 and earlier). +- ```` no longer includes ```` in any C++ version (it was prevously included in C++20 and earlier). + - The headers ```` and ```` have been removed, since all the contents have been implemented in namespace ``std`` for at least two releases. diff --git a/libcxx/include/string b/libcxx/include/string --- a/libcxx/include/string +++ b/libcxx/include/string @@ -4395,7 +4395,6 @@ # include # include # include -# include #endif #endif // _LIBCPP_STRING diff --git a/libcxx/include/vector b/libcxx/include/vector --- a/libcxx/include/vector +++ b/libcxx/include/vector @@ -293,6 +293,7 @@ #include <__debug> #include <__format/enable_insertable.h> #include <__format/formatter.h> +#include <__format/formatter_bool.h> #include <__functional/hash.h> #include <__functional/unary_function.h> #include <__iterator/advance.h> @@ -3323,7 +3324,7 @@ #endif // _LIBCPP_STD_VER >= 20 -#if _LIBCPP_STD_VER >= 23 +#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT) && _LIBCPP_STD_VER >= 23 template // Since is-vector-bool-reference is only used once it's inlined here. requires same_as> @@ -3342,7 +3343,7 @@ return __underlying_.format(__ref, __ctx); } }; -#endif // _LIBCPP_STD_VER >= 23 +#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT) && _LIBCPP_STD_VER >= 23 _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/test/libcxx/transitive_includes/cxx03.csv b/libcxx/test/libcxx/transitive_includes/cxx03.csv --- a/libcxx/test/libcxx/transitive_includes/cxx03.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx03.csv @@ -398,7 +398,6 @@ functional vector functional version future atomic -future cerrno future chrono future cstddef future cstdint @@ -815,7 +814,6 @@ string type_traits string typeinfo string utility -string vector string version string_view algorithm string_view compare @@ -839,32 +837,26 @@ strstream version system_error cerrno system_error compare -system_error cstddef system_error cstdint system_error cstring system_error limits -system_error stdexcept system_error string system_error type_traits system_error version -thread array thread cerrno thread chrono thread compare thread cstddef thread cstdint -thread cstdlib thread cstring thread ctime thread functional thread iosfwd thread limits -thread locale thread new thread ratio thread stdexcept thread string -thread string_view thread system_error thread tuple thread type_traits @@ -962,7 +954,9 @@ variant utility variant version vector algorithm +vector array vector atomic +vector cerrno vector climits vector compare vector concepts @@ -973,8 +967,11 @@ vector initializer_list vector iosfwd vector limits +vector locale vector new vector stdexcept +vector string +vector string_view vector tuple vector type_traits vector typeinfo diff --git a/libcxx/test/libcxx/transitive_includes/cxx11.csv b/libcxx/test/libcxx/transitive_includes/cxx11.csv --- a/libcxx/test/libcxx/transitive_includes/cxx11.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx11.csv @@ -398,7 +398,6 @@ functional vector functional version future atomic -future cerrno future chrono future cstddef future cstdint @@ -816,7 +815,6 @@ string type_traits string typeinfo string utility -string vector string version string_view algorithm string_view compare @@ -840,32 +838,26 @@ strstream version system_error cerrno system_error compare -system_error cstddef system_error cstdint system_error cstring system_error limits -system_error stdexcept system_error string system_error type_traits system_error version -thread array thread cerrno thread chrono thread compare thread cstddef thread cstdint -thread cstdlib thread cstring thread ctime thread functional thread iosfwd thread limits -thread locale thread new thread ratio thread stdexcept thread string -thread string_view thread system_error thread tuple thread type_traits @@ -963,7 +955,9 @@ variant utility variant version vector algorithm +vector array vector atomic +vector cerrno vector climits vector compare vector concepts @@ -974,8 +968,11 @@ vector initializer_list vector iosfwd vector limits +vector locale vector new vector stdexcept +vector string +vector string_view vector tuple vector type_traits vector typeinfo diff --git a/libcxx/test/libcxx/transitive_includes/cxx14.csv b/libcxx/test/libcxx/transitive_includes/cxx14.csv --- a/libcxx/test/libcxx/transitive_includes/cxx14.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx14.csv @@ -400,7 +400,6 @@ functional vector functional version future atomic -future cerrno future chrono future cstddef future cstdint @@ -818,7 +817,6 @@ string type_traits string typeinfo string utility -string vector string version string_view algorithm string_view compare @@ -842,32 +840,26 @@ strstream version system_error cerrno system_error compare -system_error cstddef system_error cstdint system_error cstring system_error limits -system_error stdexcept system_error string system_error type_traits system_error version -thread array thread cerrno thread chrono thread compare thread cstddef thread cstdint -thread cstdlib thread cstring thread ctime thread functional thread iosfwd thread limits -thread locale thread new thread ratio thread stdexcept thread string -thread string_view thread system_error thread tuple thread type_traits @@ -965,7 +957,9 @@ variant utility variant version vector algorithm +vector array vector atomic +vector cerrno vector climits vector compare vector concepts @@ -976,8 +970,11 @@ vector initializer_list vector iosfwd vector limits +vector locale vector new vector stdexcept +vector string +vector string_view vector tuple vector type_traits vector typeinfo diff --git a/libcxx/test/libcxx/transitive_includes/cxx17.csv b/libcxx/test/libcxx/transitive_includes/cxx17.csv --- a/libcxx/test/libcxx/transitive_includes/cxx17.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx17.csv @@ -400,7 +400,6 @@ functional vector functional version future atomic -future cerrno future chrono future cstddef future cstdint @@ -818,7 +817,6 @@ string type_traits string typeinfo string utility -string vector string version string_view algorithm string_view compare @@ -842,32 +840,26 @@ strstream version system_error cerrno system_error compare -system_error cstddef system_error cstdint system_error cstring system_error limits -system_error stdexcept system_error string system_error type_traits system_error version -thread array thread cerrno thread chrono thread compare thread cstddef thread cstdint -thread cstdlib thread cstring thread ctime thread functional thread iosfwd thread limits -thread locale thread new thread ratio thread stdexcept thread string -thread string_view thread system_error thread tuple thread type_traits @@ -965,7 +957,9 @@ variant utility variant version vector algorithm +vector array vector atomic +vector cerrno vector climits vector compare vector concepts @@ -976,8 +970,11 @@ vector initializer_list vector iosfwd vector limits +vector locale vector new vector stdexcept +vector string +vector string_view vector tuple vector type_traits vector typeinfo diff --git a/libcxx/test/libcxx/transitive_includes/cxx20.csv b/libcxx/test/libcxx/transitive_includes/cxx20.csv --- a/libcxx/test/libcxx/transitive_includes/cxx20.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx20.csv @@ -407,7 +407,6 @@ functional vector functional version future atomic -future cerrno future cstddef future cstdint future cstdlib @@ -824,7 +823,6 @@ string type_traits string typeinfo string utility -string vector string version string_view algorithm string_view compare @@ -848,31 +846,25 @@ strstream version system_error cerrno system_error compare -system_error cstddef system_error cstdint system_error cstring system_error limits -system_error stdexcept system_error string system_error type_traits system_error version -thread array thread cerrno thread compare thread cstddef thread cstdint -thread cstdlib thread cstring thread ctime thread functional thread iosfwd thread limits -thread locale thread new thread ratio thread stdexcept thread string -thread string_view thread system_error thread tuple thread type_traits @@ -970,7 +962,9 @@ variant utility variant version vector algorithm +vector array vector atomic +vector cerrno vector climits vector compare vector concepts @@ -981,8 +975,11 @@ vector initializer_list vector iosfwd vector limits +vector locale vector new vector stdexcept +vector string +vector string_view vector tuple vector type_traits vector typeinfo diff --git a/libcxx/test/libcxx/transitive_includes/cxx2b.csv b/libcxx/test/libcxx/transitive_includes/cxx2b.csv --- a/libcxx/test/libcxx/transitive_includes/cxx2b.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx2b.csv @@ -644,15 +644,21 @@ variant new variant tuple variant version +vector array +vector cerrno vector climits vector compare vector cstddef vector cstdint +vector cstdlib vector cstring vector initializer_list vector iosfwd vector limits +vector locale vector new vector stdexcept +vector string +vector string_view vector tuple vector version diff --git a/libcxx/test/std/containers/sequences/vector.bool/vector.bool.fmt/types.compile.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/vector.bool.fmt/types.compile.pass.cpp new file mode 100644 --- /dev/null +++ b/libcxx/test/std/containers/sequences/vector.bool/vector.bool.fmt/types.compile.pass.cpp @@ -0,0 +1,41 @@ +//===----------------------------------------------------------------------===// +// 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 +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20 +// UNSUPPORTED: libcpp-has-no-incomplete-format + +// + +// template requires is-vector-bool-reference +// struct formatter; + +// [format.formatter.spec]/4 +// If the library provides an explicit or partial specialization of +// formatter, that specialization is enabled and meets the +// Formatter requirements except as noted otherwise. +// +// Tests parts of the BasicFormatter requirements. Like the formattable concept +// it uses the semiregular concept. It test does not use the formattable +// concept since it is the intention the formatter is available without +// including the format header. + +// TODO FMT Evaluate what to do with [format.formatter.spec]/2 +// [format.formatter.spec]/2 +// Each header that declares the template formatter provides the following +// enabled specializations: +// Then there is a list of formatters, but is that really useful? +// Note this should be discussed in LEWG. + +#include +#include + +#include "test_macros.h" + +static_assert(std::semiregular::reference, char>>); +#ifndef TEST_HAS_NO_WIDE_CHARACTERS +static_assert(std::semiregular::reference, wchar_t>>); +#endif