30#if FMT_GCC_VERSION && FMT_GCC_VERSION < 409
32template <
typename... Args>
39template <
typename... Args>
64template <
typename... Args>
73#if FMT_USE_USER_DEFINED_LITERALS && !FMT_USE_NONTYPE_TEMPLATE_ARGS
74 constexpr detail::udl_arg<wchar_t>
operator"" _a(
const wchar_t *
s,
size_t)
81template <
typename It,
typename Sentinel>
85 return {begin, end, sep};
88template <
typename Range>
92 return join(std::begin(range), std::end(range), sep);
99 return join(std::begin(list), std::end(list), sep);
102template <
typename Char, FMT_ENABLE_IF(!std::is_same<Char,
char>::value)>
105 -> std::basic_string<Char>
108 detail::vformat_to(
buffer, format_str, args);
112template <
typename... T>
115 return vformat(fmt::wstring_view(
fmt), fmt::make_wformat_args(args...));
120template <
typename S,
typename... Args,
typename Char =
char_t<S>,
FMT_ENABLE_IF(!std::is_same<Char, char>::value && !std::is_same<Char, wchar_t>::value)>
121auto format(
const S& format_str, Args&&... args) -> std::basic_string<Char>
123 return vformat(detail::to_string_view(format_str),
127template <
typename Locale,
typename S,
typename Char =
char_t<S>, FMT_ENABLE_IF(detail::is_locale<Locale>::value&& detail::is_exotic_
char<Char>::value)>
130 -> std::basic_string<Char>
132 return detail::vformat(loc, detail::to_string_view(format_str), args);
136inline auto format(
const Locale& loc,
const S& format_str, Args&&... args)
137 -> std::basic_string<Char>
139 return detail::vformat(loc, detail::to_string_view(format_str),
143template <
typename OutputIt,
typename S,
typename Char =
char_t<S>, FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, Char>::value&& detail::is_exotic_
char<Char>::value)>
147 auto&& buf = detail::get_buffer<Char>(
out);
148 detail::vformat_to(buf, detail::to_string_view(format_str), args);
149 return detail::get_iterator(buf);
163 auto&& buf = detail::get_buffer<Char>(
out);
164 vformat_to(buf, detail::to_string_view(format_str), args,
165 detail::locale_ref(loc));
166 return detail::get_iterator(buf);
175 bool enable = detail::is_output_iterator<OutputIt, Char>::value &&
177inline auto format_to(OutputIt
out,
const Locale& loc,
const S& format_str, Args&&... args) ->
178 typename std::enable_if<enable, OutputIt>::type
189 detail::iterator_buffer<OutputIt, Char, detail::fixed_buffer_traits> buf(
out,
191 detail::vformat_to(buf, format_str, args);
192 return {buf.out(), buf.count()};
205 detail::counting_buffer<Char> buf;
206 detail::vformat_to(buf, detail::to_string_view(
fmt),
225template <
typename... T>
231template <
typename... T>
auto format(wformat_string< T... > fmt, T &&... args) -> std::wstring
Definition xchar.h:113
auto vformat_to(OutputIt out, const S &format_str, basic_format_args< buffer_context< type_identity_t< Char > > > args) -> OutputIt
Definition xchar.h:144
auto vformat(basic_string_view< Char > format_str, basic_format_args< buffer_context< type_identity_t< Char > > > args) -> std::basic_string< Char >
Definition xchar.h:103
auto format_to(OutputIt out, const S &fmt, Args &&... args) -> OutputIt
Definition xchar.h:153
basic_string_view< wchar_t > wstring_view
Definition xchar.h:24
basic_format_string< wchar_t, type_identity_t< Args >... > wformat_string
Definition xchar.h:40
constexpr format_arg_store< wformat_context, Args... > make_wformat_args(const Args &... args)
Definition xchar.h:65
auto vformat_to_n(OutputIt out, size_t n, basic_string_view< Char > format_str, basic_format_args< buffer_context< type_identity_t< Char > > > args) -> format_to_n_result< OutputIt >
Definition xchar.h:185
auto format_to_n(OutputIt out, size_t n, const S &fmt, const Args &... args) -> format_to_n_result< OutputIt >
Definition xchar.h:196
basic_format_parse_context< wchar_t > wformat_parse_context
Definition xchar.h:25
auto formatted_size(const S &fmt, Args &&... args) -> size_t
Definition xchar.h:203
auto to_wstring(const T &value) -> std::wstring
Definition xchar.h:241
auto join(It begin, Sentinel end, wstring_view sep) -> join_view< It, Sentinel, wchar_t >
Definition xchar.h:82
void print(std::FILE *f, wformat_string< T... > fmt, T &&... args)
Definition xchar.h:226
void vprint(std::FILE *f, wstring_view fmt, wformat_args args)
Definition xchar.h:211
buffer_context< wchar_t > wformat_context
Definition xchar.h:26
auto runtime(wstring_view s) -> basic_runtime< wchar_t >
Definition xchar.h:41
basic_format_args< wformat_context > wformat_args
Definition xchar.h:27
FMT_CONSTEXPR20 void push_back(const T &value)
Definition core.h:1137
FMT_CONSTEXPR auto data() noexcept -> T *
Definition core.h:1102
std::integral_constant< bool, B > bool_constant
Definition core.h:306
typename detail::char_t_impl< S >::type char_t
Definition core.h:759
#define FMT_MODULE_EXPORT_BEGIN
Definition core.h:226
#define FMT_BEGIN_NAMESPACE
Definition core.h:214
#define FMT_ENABLE_IF(...)
Definition core.h:364
FMT_INLINE auto to_string_view(const Char *s) -> basic_string_view< Char >
Definition core.h:630
typename type_identity< T >::type type_identity_t
Definition core.h:319
#define FMT_END_NAMESPACE
Definition core.h:219
#define FMT_MODULE_EXPORT_END
Definition core.h:227
#define out
Definition encodings.cpp:5
decltype(std::end(std::declval< T & >())) sentinel_t
Definition format.h:556
bool_constant<!std::is_same< T, char >::value > is_exotic_char
Definition xchar.h:19
Definition bin_to_hex.h:111
s
Definition tag_strings.h:47