[libcxx-commits] [libcxx] a595fcf - [NFC][libc++][format] Renames __char_type concept.

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Wed Aug 31 10:21:11 PDT 2022


Author: Mark de Wever
Date: 2022-08-31T19:21:01+02:00
New Revision: a595fcf9b45cfbf7e76cc512555df8250e1aeb66

URL: https://github.com/llvm/llvm-project/commit/a595fcf9b45cfbf7e76cc512555df8250e1aeb66
DIFF: https://github.com/llvm/llvm-project/commit/a595fcf9b45cfbf7e76cc512555df8250e1aeb66.diff

LOG: [NFC][libc++][format] Renames __char_type concept.

Move the concept to the concepts header and uses a name in the style of
P2286.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D131176

Added: 
    

Modified: 
    libcxx/include/__format/buffer.h
    libcxx/include/__format/concepts.h
    libcxx/include/__format/formatter.h
    libcxx/include/__format/formatter_bool.h
    libcxx/include/__format/formatter_char.h
    libcxx/include/__format/formatter_floating_point.h
    libcxx/include/__format/formatter_integer.h
    libcxx/include/__format/formatter_integral.h
    libcxx/include/__format/formatter_pointer.h
    libcxx/include/__format/formatter_string.h

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__format/buffer.h b/libcxx/include/__format/buffer.h
index 4a813e73efd7..e0551de7a336 100644
--- a/libcxx/include/__format/buffer.h
+++ b/libcxx/include/__format/buffer.h
@@ -17,9 +17,9 @@
 #include <__algorithm/transform.h>
 #include <__algorithm/unwrap_iter.h>
 #include <__config>
+#include <__format/concepts.h>
 #include <__format/enable_insertable.h>
 #include <__format/format_to_n_result.h>
-#include <__format/formatter.h> // for __char_type TODO FMT Move the concept?
 #include <__iterator/back_insert_iterator.h>
 #include <__iterator/concepts.h>
 #include <__iterator/incrementable_traits.h>
@@ -49,7 +49,7 @@ namespace __format {
 /// This helper is used together with the @ref back_insert_iterator to offer
 /// type-erasure for the formatting functions. This reduces the number to
 /// template instantiations.
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 class _LIBCPP_TEMPLATE_VIS __output_buffer {
 public:
   using value_type = _CharT;
@@ -222,7 +222,7 @@ class _LIBCPP_TEMPLATE_VIS __output_buffer {
 ///
 /// This storage is used when writing a single element to the output iterator
 /// is expensive.
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 class _LIBCPP_TEMPLATE_VIS __internal_storage {
 public:
   _LIBCPP_HIDE_FROM_ABI _CharT* __begin() { return __buffer_; }
@@ -238,11 +238,11 @@ class _LIBCPP_TEMPLATE_VIS __internal_storage {
 /// This requires the storage to be a contiguous buffer of \a _CharT.
 /// Since the output is directly written to the underlying storage this class
 /// is just an empty class.
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 class _LIBCPP_TEMPLATE_VIS __direct_storage {};
 
 template <class _OutIt, class _CharT>
-concept __enable_direct_output = __formatter::__char_type<_CharT> &&
+concept __enable_direct_output = __fmt_char_type<_CharT> &&
     (same_as<_OutIt, _CharT*>
 #ifndef _LIBCPP_ENABLE_DEBUG_MODE
      || same_as<_OutIt, __wrap_iter<_CharT*>>
@@ -250,7 +250,7 @@ concept __enable_direct_output = __formatter::__char_type<_CharT> &&
     );
 
 /// Write policy for directly writing to the underlying output.
-template <class _OutIt, __formatter::__char_type _CharT>
+template <class _OutIt, __fmt_char_type _CharT>
 class _LIBCPP_TEMPLATE_VIS __writer_direct {
 public:
   _LIBCPP_HIDE_FROM_ABI explicit __writer_direct(_OutIt __out_it)
@@ -269,7 +269,7 @@ class _LIBCPP_TEMPLATE_VIS __writer_direct {
 };
 
 /// Write policy for copying the buffer to the output.
-template <class _OutIt, __formatter::__char_type _CharT>
+template <class _OutIt, __fmt_char_type _CharT>
 class _LIBCPP_TEMPLATE_VIS __writer_iterator {
 public:
   _LIBCPP_HIDE_FROM_ABI explicit __writer_iterator(_OutIt __out_it)
@@ -294,7 +294,7 @@ class _LIBCPP_TEMPLATE_VIS __writer_iterator {
 /// \ref __enable_insertable.
 template <class _Container>
 concept __insertable =
-    __enable_insertable<_Container> && __formatter::__char_type<typename _Container::value_type> &&
+    __enable_insertable<_Container> && __fmt_char_type<typename _Container::value_type> &&
     requires(_Container& __t, add_pointer_t<typename _Container::value_type> __first,
              add_pointer_t<typename _Container::value_type> __last) { __t.insert(__t.end(), __first, __last); };
 
@@ -340,7 +340,7 @@ class _LIBCPP_TEMPLATE_VIS __writer_selector {
 };
 
 /// The generic formatting buffer.
-template <class _OutIt, __formatter::__char_type _CharT>
+template <class _OutIt, __fmt_char_type _CharT>
 requires(output_iterator<_OutIt, const _CharT&>) class _LIBCPP_TEMPLATE_VIS
     __format_buffer {
   using _Storage =
@@ -376,7 +376,7 @@ requires(output_iterator<_OutIt, const _CharT&>) class _LIBCPP_TEMPLATE_VIS
 ///
 /// Since \ref formatted_size only needs to know the size, the output itself is
 /// discarded.
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 class _LIBCPP_TEMPLATE_VIS __formatted_size_buffer {
 public:
   _LIBCPP_HIDE_FROM_ABI auto __make_output_iterator() { return __output_.__make_output_iterator(); }
@@ -395,7 +395,7 @@ class _LIBCPP_TEMPLATE_VIS __formatted_size_buffer {
 };
 
 /// The base of a buffer that counts and limits the number of insertions.
-template <class _OutIt, __formatter::__char_type _CharT, bool>
+template <class _OutIt, __fmt_char_type _CharT, bool>
   requires(output_iterator<_OutIt, const _CharT&>)
 struct _LIBCPP_TEMPLATE_VIS __format_to_n_buffer_base {
   using _Size = iter_
diff erence_t<_OutIt>;
@@ -425,7 +425,7 @@ struct _LIBCPP_TEMPLATE_VIS __format_to_n_buffer_base {
 ///
 /// This class limits the size available to the direct writer so it will not
 /// exceed the maximum number of code units.
-template <class _OutIt, __formatter::__char_type _CharT>
+template <class _OutIt, __fmt_char_type _CharT>
   requires(output_iterator<_OutIt, const _CharT&>)
 class _LIBCPP_TEMPLATE_VIS __format_to_n_buffer_base<_OutIt, _CharT, true> {
   using _Size = iter_
diff erence_t<_OutIt>;
@@ -475,7 +475,7 @@ class _LIBCPP_TEMPLATE_VIS __format_to_n_buffer_base<_OutIt, _CharT, true> {
 };
 
 /// The buffer that counts and limits the number of insertions.
-template <class _OutIt, __formatter::__char_type _CharT>
+template <class _OutIt, __fmt_char_type _CharT>
   requires(output_iterator<_OutIt, const _CharT&>)
 struct _LIBCPP_TEMPLATE_VIS __format_to_n_buffer final
     : public __format_to_n_buffer_base< _OutIt, _CharT, __enable_direct_output<_OutIt, _CharT>> {

diff  --git a/libcxx/include/__format/concepts.h b/libcxx/include/__format/concepts.h
index 8df6493b0aed..09ce22feb4a4 100644
--- a/libcxx/include/__format/concepts.h
+++ b/libcxx/include/__format/concepts.h
@@ -25,6 +25,15 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 #if _LIBCPP_STD_VER > 17
 
+/// The character type specializations of \ref formatter.
+template <class _CharT>
+concept __fmt_char_type =
+    same_as<_CharT, char>
+#  ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+    || same_as<_CharT, wchar_t>
+#  endif
+    ;
+
 // The output iterator isn't specified. A formatter should accept any
 // output_iterator. This iterator is a minimal iterator to test the concept.
 // (Note testing for (w)format_context would be a valid choice, but requires

diff  --git a/libcxx/include/__format/formatter.h b/libcxx/include/__format/formatter.h
index 4816f961c445..154f8a526222 100644
--- a/libcxx/include/__format/formatter.h
+++ b/libcxx/include/__format/formatter.h
@@ -11,7 +11,6 @@
 #define _LIBCPP___FORMAT_FORMATTER_H
 
 #include <__availability>
-#include <__concepts/same_as.h>
 #include <__config>
 #include <__format/format_fwd.h>
 
@@ -39,14 +38,6 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter {
   formatter& operator=(const formatter&) = delete;
 };
 
-namespace __formatter {
-
-/** The character types that formatters are specialized for. */
-template <class _CharT>
-concept __char_type = same_as<_CharT, char> || same_as<_CharT, wchar_t>;
-
-} // namespace __formatter
-
 #endif //_LIBCPP_STD_VER > 17
 
 _LIBCPP_END_NAMESPACE_STD

diff  --git a/libcxx/include/__format/formatter_bool.h b/libcxx/include/__format/formatter_bool.h
index cdb0631f87d4..0d005a1bee23 100644
--- a/libcxx/include/__format/formatter_bool.h
+++ b/libcxx/include/__format/formatter_bool.h
@@ -14,8 +14,8 @@
 #include <__availability>
 #include <__config>
 #include <__debug>
+#include <__format/concepts.h>
 #include <__format/format_error.h>
-#include <__format/format_fwd.h>
 #include <__format/format_parse_context.h>
 #include <__format/formatter.h>
 #include <__format/formatter_integral.h>
@@ -35,7 +35,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 #if _LIBCPP_STD_VER > 17
 
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<bool, _CharT> {
 public:
   _LIBCPP_HIDE_FROM_ABI constexpr auto

diff  --git a/libcxx/include/__format/formatter_char.h b/libcxx/include/__format/formatter_char.h
index a3ca36ec0a62..ee615da72d83 100644
--- a/libcxx/include/__format/formatter_char.h
+++ b/libcxx/include/__format/formatter_char.h
@@ -13,7 +13,7 @@
 #include <__availability>
 #include <__concepts/same_as.h>
 #include <__config>
-#include <__format/format_fwd.h>
+#include <__format/concepts.h>
 #include <__format/format_parse_context.h>
 #include <__format/formatter.h>
 #include <__format/formatter_integral.h>
@@ -30,7 +30,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 #if _LIBCPP_STD_VER > 17
 
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT __formatter_char {
 public:
   _LIBCPP_HIDE_FROM_ABI constexpr auto

diff  --git a/libcxx/include/__format/formatter_floating_point.h b/libcxx/include/__format/formatter_floating_point.h
index 3a65ed436def..097dbe66ceb9 100644
--- a/libcxx/include/__format/formatter_floating_point.h
+++ b/libcxx/include/__format/formatter_floating_point.h
@@ -18,7 +18,7 @@
 #include <__concepts/arithmetic.h>
 #include <__concepts/same_as.h>
 #include <__config>
-#include <__format/format_fwd.h>
+#include <__format/concepts.h>
 #include <__format/format_parse_context.h>
 #include <__format/formatter.h>
 #include <__format/formatter_integral.h>
@@ -683,7 +683,7 @@ __format_floating_point(_Tp __value, auto& __ctx, __format_spec::__parsed_specif
 
 } // namespace __formatter
 
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 struct _LIBCPP_TEMPLATE_VIS __formatter_floating_point {
 public:
   _LIBCPP_HIDE_FROM_ABI constexpr auto
@@ -701,13 +701,13 @@ struct _LIBCPP_TEMPLATE_VIS __formatter_floating_point {
   __format_spec::__parser<_CharT> __parser_;
 };
 
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<float, _CharT>
     : public __formatter_floating_point<_CharT> {};
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<double, _CharT>
     : public __formatter_floating_point<_CharT> {};
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<long double, _CharT>
     : public __formatter_floating_point<_CharT> {};
 

diff  --git a/libcxx/include/__format/formatter_integer.h b/libcxx/include/__format/formatter_integer.h
index 3139c9efdf80..b4be9f9a07ce 100644
--- a/libcxx/include/__format/formatter_integer.h
+++ b/libcxx/include/__format/formatter_integer.h
@@ -13,7 +13,7 @@
 #include <__availability>
 #include <__concepts/arithmetic.h>
 #include <__config>
-#include <__format/format_fwd.h>
+#include <__format/concepts.h>
 #include <__format/format_parse_context.h>
 #include <__format/formatter.h>
 #include <__format/formatter_integral.h>
@@ -30,7 +30,7 @@
 
 #if _LIBCPP_STD_VER > 17
 
-    template <__formatter::__char_type _CharT>
+    template <__fmt_char_type _CharT>
     struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT __formatter_integer {
 
 public:
@@ -59,43 +59,43 @@
 };
 
 // Signed integral types.
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<signed char, _CharT>
     : public __formatter_integer<_CharT> {};
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<short, _CharT> : public __formatter_integer<_CharT> {
 };
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<int, _CharT> : public __formatter_integer<_CharT> {};
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<long, _CharT> : public __formatter_integer<_CharT> {};
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<long long, _CharT>
     : public __formatter_integer<_CharT> {};
 #  ifndef _LIBCPP_HAS_NO_INT128
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<__int128_t, _CharT>
     : public __formatter_integer<_CharT> {};
 #  endif
 
 // Unsigned integral types.
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<unsigned char, _CharT>
     : public __formatter_integer<_CharT> {};
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<unsigned short, _CharT>
     : public __formatter_integer<_CharT> {};
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<unsigned, _CharT>
     : public __formatter_integer<_CharT> {};
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<unsigned long, _CharT>
     : public __formatter_integer<_CharT> {};
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<unsigned long long, _CharT>
     : public __formatter_integer<_CharT> {};
 #  ifndef _LIBCPP_HAS_NO_INT128
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<__uint128_t, _CharT>
     : public __formatter_integer<_CharT> {};
 #  endif

diff  --git a/libcxx/include/__format/formatter_integral.h b/libcxx/include/__format/formatter_integral.h
index 834a402081aa..d23b39837f88 100644
--- a/libcxx/include/__format/formatter_integral.h
+++ b/libcxx/include/__format/formatter_integral.h
@@ -13,8 +13,8 @@
 #include <__concepts/arithmetic.h>
 #include <__concepts/same_as.h>
 #include <__config>
+#include <__format/concepts.h>
 #include <__format/format_error.h>
-#include <__format/formatter.h> // for __char_type TODO FMT Move the concept?
 #include <__format/formatter_output.h>
 #include <__format/parser_std_format_spec.h>
 #include <__utility/unreachable.h>
@@ -112,7 +112,7 @@ _LIBCPP_HIDE_FROM_ABI inline string __determine_grouping(ptr
diff _t __size, const
 // Char
 //
 
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 _LIBCPP_HIDE_FROM_ABI auto __format_char(
     integral auto __value,
     output_iterator<const _CharT&> auto __out_it,

diff  --git a/libcxx/include/__format/formatter_pointer.h b/libcxx/include/__format/formatter_pointer.h
index 3cd4c9bba960..31b49e17ab47 100644
--- a/libcxx/include/__format/formatter_pointer.h
+++ b/libcxx/include/__format/formatter_pointer.h
@@ -12,7 +12,7 @@
 
 #include <__availability>
 #include <__config>
-#include <__format/format_fwd.h>
+#include <__format/concepts.h>
 #include <__format/format_parse_context.h>
 #include <__format/formatter.h>
 #include <__format/formatter_integral.h>
@@ -29,7 +29,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 #if _LIBCPP_STD_VER > 17
 
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 struct _LIBCPP_TEMPLATE_VIS __formatter_pointer {
 public:
   constexpr __formatter_pointer() { __parser_.__alignment_ = __format_spec::__alignment::__right; }
@@ -56,13 +56,13 @@ struct _LIBCPP_TEMPLATE_VIS __formatter_pointer {
 // - struct formatter<nullptr_t, charT>;
 // - template<> struct formatter<void*, charT>;
 // - template<> struct formatter<const void*, charT>;
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<nullptr_t, _CharT>
     : public __formatter_pointer<_CharT> {};
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<void*, _CharT> : public __formatter_pointer<_CharT> {
 };
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<const void*, _CharT>
     : public __formatter_pointer<_CharT> {};
 

diff  --git a/libcxx/include/__format/formatter_string.h b/libcxx/include/__format/formatter_string.h
index 71bda4fcded1..798e472f11db 100644
--- a/libcxx/include/__format/formatter_string.h
+++ b/libcxx/include/__format/formatter_string.h
@@ -12,7 +12,7 @@
 
 #include <__availability>
 #include <__config>
-#include <__format/format_fwd.h>
+#include <__format/concepts.h>
 #include <__format/format_parse_context.h>
 #include <__format/formatter.h>
 #include <__format/formatter_output.h>
@@ -29,7 +29,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 #if _LIBCPP_STD_VER > 17
 
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 struct _LIBCPP_TEMPLATE_VIS __formatter_string {
 public:
   _LIBCPP_HIDE_FROM_ABI constexpr auto parse(basic_format_parse_context<_CharT>& __parse_ctx)
@@ -47,7 +47,7 @@ struct _LIBCPP_TEMPLATE_VIS __formatter_string {
 };
 
 // Formatter const char*.
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<const _CharT*, _CharT>
     : public __formatter_string<_CharT> {
   using _Base = __formatter_string<_CharT>;
@@ -80,7 +80,7 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<const _CharT*,
 };
 
 // Formatter char*.
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<_CharT*, _CharT>
     : public formatter<const _CharT*, _CharT> {
   using _Base = formatter<const _CharT*, _CharT>;
@@ -91,7 +91,7 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<_CharT*, _Char
 };
 
 // Formatter char[].
-template <__formatter::__char_type _CharT, size_t _Size>
+template <__fmt_char_type _CharT, size_t _Size>
 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<_CharT[_Size], _CharT>
     : public __formatter_string<_CharT> {
   using _Base = __formatter_string<_CharT>;
@@ -102,7 +102,7 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<_CharT[_Size],
 };
 
 // Formatter const char[].
-template <__formatter::__char_type _CharT, size_t _Size>
+template <__fmt_char_type _CharT, size_t _Size>
 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<const _CharT[_Size], _CharT>
     : public __formatter_string<_CharT> {
   using _Base = __formatter_string<_CharT>;
@@ -113,7 +113,7 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<const _CharT[_
 };
 
 // Formatter std::string.
-template <__formatter::__char_type _CharT, class _Traits, class _Allocator>
+template <__fmt_char_type _CharT, class _Traits, class _Allocator>
 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<basic_string<_CharT, _Traits, _Allocator>, _CharT>
     : public __formatter_string<_CharT> {
   using _Base = __formatter_string<_CharT>;
@@ -126,7 +126,7 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<basic_string<_
 };
 
 // Formatter std::string_view.
-template <__formatter::__char_type _CharT, class _Traits>
+template <__fmt_char_type _CharT, class _Traits>
 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<basic_string_view<_CharT, _Traits>, _CharT>
     : public __formatter_string<_CharT> {
   using _Base = __formatter_string<_CharT>;


        


More information about the libcxx-commits mailing list