From: Mark de Wever Date: Wed, 31 Aug 2022 18:14:10 +0000 (+0200) Subject: [libc++][format] Fixes broken CI. X-Git-Tag: upstream/17.0.6~34818 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=37c98da395ea83a5114c8b5ab9a07e5b56f9e60e;p=platform%2Fupstream%2Fllvm.git [libc++][format] Fixes broken CI. Some of the merged patches didn't have conflicts but were not compatible. This should fix it. --- diff --git a/libcxx/include/__format/buffer.h b/libcxx/include/__format/buffer.h index e0551de..504f871 100644 --- a/libcxx/include/__format/buffer.h +++ b/libcxx/include/__format/buffer.h @@ -82,7 +82,7 @@ public: /// /// Since some of the input is generated by std::to_chars, there needs to be a /// conversion when _CharT is wchar_t. - template <__formatter::__char_type _InCharT> + template <__fmt_char_type _InCharT> _LIBCPP_HIDE_FROM_ABI void __copy(basic_string_view<_InCharT> __str) { // When the underlying iterator is a simple iterator the __capacity_ is // infinite. For a string or container back_inserter it isn't. This means @@ -121,7 +121,7 @@ public: /// A std::transform wrapper. /// /// Like @ref __copy it may need to do type conversion. - template <__formatter::__char_type _InCharT, class _UnaryOperation> + template <__fmt_char_type _InCharT, class _UnaryOperation> _LIBCPP_HIDE_FROM_ABI void __transform(const _InCharT* __first, const _InCharT* __last, _UnaryOperation __operation) { _LIBCPP_ASSERT(__first <= __last, "not a valid range"); diff --git a/libcxx/include/__format/formatter_output.h b/libcxx/include/__format/formatter_output.h index 8a6ce5c..6045940 100644 --- a/libcxx/include/__format/formatter_output.h +++ b/libcxx/include/__format/formatter_output.h @@ -10,12 +10,14 @@ #ifndef _LIBCPP___FORMAT_FORMATTER_OUTPUT_H #define _LIBCPP___FORMAT_FORMATTER_OUTPUT_H +#include <__algorithm/in_out_result.h> #include <__algorithm/ranges_copy.h> #include <__algorithm/ranges_fill_n.h> #include <__algorithm/ranges_transform.h> #include <__concepts/same_as.h> #include <__config> #include <__format/buffer.h> +#include <__format/concepts.h> #include <__format/formatter.h> #include <__format/parser_std_format_spec.h> #include <__format/unicode.h> @@ -91,7 +93,7 @@ __padding_size(size_t __size, size_t __width, __format_spec::__alignment __align /// Copy wrapper. /// /// This uses a "mass output function" of __format::__output_buffer when possible. -template <__formatter::__char_type _CharT, __formatter::__char_type _OutCharT = _CharT> +template <__fmt_char_type _CharT, __fmt_char_type _OutCharT = _CharT> _LIBCPP_HIDE_FROM_ABI auto __copy(basic_string_view<_CharT> __str, output_iterator auto __out_it) -> decltype(__out_it) { if constexpr (_VSTD::same_as>>) { @@ -102,14 +104,14 @@ _LIBCPP_HIDE_FROM_ABI auto __copy(basic_string_view<_CharT> __str, output_iterat } } -template <__formatter::__char_type _CharT, __formatter::__char_type _OutCharT = _CharT> +template <__fmt_char_type _CharT, __fmt_char_type _OutCharT = _CharT> _LIBCPP_HIDE_FROM_ABI auto __copy(const _CharT* __first, const _CharT* __last, output_iterator auto __out_it) -> decltype(__out_it) { return __formatter::__copy(basic_string_view{__first, __last}, _VSTD::move(__out_it)); } -template <__formatter::__char_type _CharT, __formatter::__char_type _OutCharT = _CharT> +template <__fmt_char_type _CharT, __fmt_char_type _OutCharT = _CharT> _LIBCPP_HIDE_FROM_ABI auto __copy(const _CharT* __first, size_t __n, output_iterator auto __out_it) -> decltype(__out_it) { return __formatter::__copy(basic_string_view{__first, __n}, _VSTD::move(__out_it)); @@ -118,7 +120,7 @@ _LIBCPP_HIDE_FROM_ABI auto __copy(const _CharT* __first, size_t __n, output_iter /// Transform wrapper. /// /// This uses a "mass output function" of __format::__output_buffer when possible. -template <__formatter::__char_type _CharT, __formatter::__char_type _OutCharT = _CharT, class _UnaryOperation> +template <__fmt_char_type _CharT, __fmt_char_type _OutCharT = _CharT, class _UnaryOperation> _LIBCPP_HIDE_FROM_ABI auto __transform(const _CharT* __first, const _CharT* __last, @@ -135,7 +137,7 @@ __transform(const _CharT* __first, /// Fill wrapper. /// /// This uses a "mass output function" of __format::__output_buffer when possible. -template <__formatter::__char_type _CharT, output_iterator _OutIt> +template <__fmt_char_type _CharT, output_iterator _OutIt> _LIBCPP_HIDE_FROM_ABI _OutIt __fill(_OutIt __out_it, size_t __n, _CharT __value) { if constexpr (_VSTD::same_as>>) { __out_it.__get_container()->__fill(__n, __value);