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> 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,39 @@ +//===----------------------------------------------------------------------===// +// 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 + +static_assert(std::semiregular::reference, char>>); +#ifndef TEST_HAS_NO_WIDE_CHARACTERS +static_assert(std::semiregular::reference, wchar_t>>); +#endif