diff options
author | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-02-10 17:53:52 +0300 |
---|---|---|
committer | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-02-10 17:53:52 +0300 |
commit | 5c64b97bb7e4034eff8833e4c367f61d34fcb4ee (patch) | |
tree | 7c5769528f2fcdaa5a718aa73e4aa64d50905269 /contrib/libs/cxxsupp/libcxx/include/__format | |
parent | 1b56f620ac98766b198121ca1b728e7e61efbb56 (diff) | |
download | ydb-5c64b97bb7e4034eff8833e4c367f61d34fcb4ee.tar.gz |
intermediate changes
ref:4635f4dd763168c3fa295f87727595c785b4d5a4
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/__format')
-rw-r--r-- | contrib/libs/cxxsupp/libcxx/include/__format/format_context.h | 33 | ||||
-rw-r--r-- | contrib/libs/cxxsupp/libcxx/include/__format/parser_std_format_spec.h | 6 |
2 files changed, 23 insertions, 16 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/format_context.h b/contrib/libs/cxxsupp/libcxx/include/__format/format_context.h index 1cb7ee6a49e..b4fe5cc7b12 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__format/format_context.h +++ b/contrib/libs/cxxsupp/libcxx/include/__format/format_context.h @@ -70,9 +70,28 @@ __format_context_create( } #endif +// TODO FMT Implement [format.context]/4 +// [Note 1: For a given type charT, implementations are encouraged to provide a +// single instantiation of basic_format_context for appending to +// basic_string<charT>, vector<charT>, or any other container with contiguous +// storage by wrapping those in temporary objects with a uniform interface +// (such as a span<charT>) and polymorphic reallocation. - end note] + +using format_context = basic_format_context<back_insert_iterator<string>, char>; +#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS +using wformat_context = basic_format_context<back_insert_iterator<wstring>, wchar_t>; +#endif + template <class _OutIt, class _CharT> requires output_iterator<_OutIt, const _CharT&> -class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_context { +class + // clang-format off + _LIBCPP_TEMPLATE_VIS + _LIBCPP_AVAILABILITY_FORMAT + _LIBCPP_PREFERRED_NAME(format_context) + _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wformat_context)) + // clang-format on + basic_format_context { public: using iterator = _OutIt; using char_type = _CharT; @@ -138,18 +157,6 @@ private: #endif }; -// TODO FMT Implement [format.context]/4 -// [Note 1: For a given type charT, implementations are encouraged to provide a -// single instantiation of basic_format_context for appending to -// basic_string<charT>, vector<charT>, or any other container with contiguous -// storage by wrapping those in temporary objects with a uniform interface -// (such as a span<charT>) and polymorphic reallocation. - end note] - -using format_context = basic_format_context<back_insert_iterator<string>, char>; -#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS -using wformat_context = basic_format_context<back_insert_iterator<wstring>, wchar_t>; -#endif - #endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) #endif //_LIBCPP_STD_VER > 17 diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/parser_std_format_spec.h b/contrib/libs/cxxsupp/libcxx/include/__format/parser_std_format_spec.h index 77ee380936c..9b713b81148 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__format/parser_std_format_spec.h +++ b/contrib/libs/cxxsupp/libcxx/include/__format/parser_std_format_spec.h @@ -303,7 +303,7 @@ protected: return __r.__ptr; } - void _LIBCPP_HIDE_FROM_ABI constexpr __substitute_width_arg_id(auto __arg) { + _LIBCPP_HIDE_FROM_ABI constexpr void __substitute_width_arg_id(auto __arg) { _LIBCPP_ASSERT(__width_as_arg == 1, "Substitute width called when no substitution is required"); @@ -395,7 +395,7 @@ protected: return __r.__ptr; } - void _LIBCPP_HIDE_FROM_ABI constexpr __substitute_precision_arg_id( + _LIBCPP_HIDE_FROM_ABI constexpr void __substitute_precision_arg_id( auto __arg) { _LIBCPP_ASSERT( __precision_as_arg == 1 && __precision != __format::__number_max, @@ -576,7 +576,7 @@ private: } /** Processes the parsed std-format-spec based on the parsed display type. */ - void _LIBCPP_HIDE_FROM_ABI constexpr __process_display_type() { + _LIBCPP_HIDE_FROM_ABI constexpr void __process_display_type() { switch (this->__type) { case _Flags::_Type::__default: case _Flags::_Type::__string: |