///
/// 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
/// 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");
#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>
/// 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<const _OutCharT&> auto __out_it)
-> decltype(__out_it) {
if constexpr (_VSTD::same_as<decltype(__out_it), _VSTD::back_insert_iterator<__format::__output_buffer<_OutCharT>>>) {
}
}
-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<const _OutCharT&> 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<const _OutCharT&> auto __out_it)
-> decltype(__out_it) {
return __formatter::__copy(basic_string_view{__first, __n}, _VSTD::move(__out_it));
/// 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,
/// Fill wrapper.
///
/// This uses a "mass output function" of __format::__output_buffer when possible.
-template <__formatter::__char_type _CharT, output_iterator<const _CharT&> _OutIt>
+template <__fmt_char_type _CharT, output_iterator<const _CharT&> _OutIt>
_LIBCPP_HIDE_FROM_ABI _OutIt __fill(_OutIt __out_it, size_t __n, _CharT __value) {
if constexpr (_VSTD::same_as<decltype(__out_it), _VSTD::back_insert_iterator<__format::__output_buffer<_CharT>>>) {
__out_it.__get_container()->__fill(__n, __value);