15#ifndef FMT_STATIC_THOUSANDS_SEPARATOR
28#ifndef FMT_STATIC_THOUSANDS_SEPARATOR
30 std::use_facet<std::numpunct<wchar_t>>(loc.get<std::locale>());
31 auto separator = std::wstring();
32 auto grouping = numpunct.grouping();
33 if (!grouping.empty()) separator = std::wstring(1, numpunct.thousands_sep());
48#if FMT_GCC_VERSION && FMT_GCC_VERSION < 409
53template <
typename... Args>
60template <>
struct is_char<wchar_t> : std::true_type {};
62template <>
struct is_char<char16_t> : std::true_type {};
63template <>
struct is_char<char32_t> : std::true_type {};
65template <
typename... T>
72#if FMT_USE_USER_DEFINED_LITERALS && !FMT_USE_NONTYPE_TEMPLATE_ARGS
73constexpr detail::udl_arg<wchar_t>
operator"" _a(
const wchar_t* s,
size_t) {
79template <
typename It,
typename Sentinel>
82 return {begin, end, sep};
85template <
typename Range>
89 return join(std::begin(range), std::end(range), sep);
95 return join(std::begin(list), std::end(list), sep);
98template <
typename Char, FMT_ENABLE_IF(!std::is_same<Char,
char>::value)>
101 -> std::basic_string<Char> {
107template <
typename... T>
114template <
typename S,
typename... T,
typename Char =
char_t<S>,
116 !std::is_same<Char, wchar_t>::value)>
117auto format(
const S& format_str, T&&... args) -> std::basic_string<Char> {
122template <
typename Locale,
typename S,
typename Char =
char_t<S>,
123 FMT_ENABLE_IF(detail::is_locale<Locale>::value&&
124 detail::is_exotic_
char<Char>::value)>
126 const Locale& loc,
const S& format_str,
128 -> std::basic_string<Char> {
132template <
typename Locale,
typename S,
typename... T,
typename Char =
char_t<S>,
135inline auto format(
const Locale& loc,
const S& format_str, T&&... args)
136 -> std::basic_string<Char> {
141template <
typename OutputIt,
typename S,
typename Char =
char_t<S>,
142 FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, Char>::value&&
143 detail::is_exotic_
char<Char>::value)>
147 auto&& buf = detail::get_buffer<Char>(out);
152template <
typename OutputIt,
typename S,
typename... T,
156inline auto format_to(OutputIt out,
const S& fmt, T&&... args) -> OutputIt {
161template <
typename Locale,
typename S,
typename OutputIt,
typename... Args,
164 detail::is_locale<Locale>::value&&
167 OutputIt out,
const Locale& loc,
const S& format_str,
169 auto&& buf = detail::get_buffer<Char>(out);
176 typename OutputIt,
typename Locale,
typename S,
typename... T,
180inline auto format_to(OutputIt out,
const Locale& loc,
const S& format_str,
187template <
typename OutputIt,
typename Char,
typename... Args,
197 return {buf.out(), buf.count()};
200template <
typename OutputIt,
typename S,
typename... T,
204inline auto format_to_n(OutputIt out,
size_t n,
const S& fmt, T&&... args)
210template <
typename S,
typename... T,
typename Char =
char_t<S>,
222 buf.push_back(
L'\0');
223 std::fputws(buf.data(), f);
227 vprint(stdout, fmt, args);
230template <
typename... T>
239template <
typename... T>
251template <
typename T>
inline auto to_wstring(
const T& value) -> std::wstring {
\rst Parsing context consisting of a format string range being parsed and an argument counter for aut...
Definition: core.h:656
An implementation of std::basic_string_view for pre-C++17.
Definition: core.h:398
Definition: format.h:1080
#define FMT_END_EXPORT
Definition: core.h:185
typename detail::char_t_impl< S >::type char_t
String's character type.
Definition: core.h:646
#define FMT_BEGIN_NAMESPACE
Definition: core.h:174
constexpr auto make_format_args(T &... args) -> format_arg_store< Context, remove_cvref_t< T >... >
\rst Constructs a ~fmtformat_arg_store object that contains references to arguments and can be implic...
Definition: core.h:1824
#define FMT_ENABLE_IF(...)
Definition: core.h:286
#define FMT_BEGIN_EXPORT
Definition: core.h:184
typename type_identity< T >::type type_identity_t
Definition: core.h:267
#define FMT_END_NAMESPACE
Definition: core.h:177
detail namespace with internal helper functions
Definition: xchar.h:20
decltype(std::end(std::declval< T & >())) sentinel_t
Definition: format.h:552
auto write_loc(std::back_insert_iterator< detail::buffer< wchar_t > > out, loc_value value, const format_specs< wchar_t > &specs, locale_ref loc) -> bool
Definition: xchar.h:25
bool_constant<!std::is_same< T, char >::value > is_exotic_char
Definition: xchar.h:23
FMT_INLINE auto to_string_view(const Char *s) -> basic_string_view< Char >
Definition: core.h:517
auto vformat(const Locale &loc, basic_string_view< Char > fmt, basic_format_args< buffer_context< type_identity_t< Char > > > args) -> std::basic_string< Char >
Definition: format.h:3934
std::integral_constant< bool, Value > bool_constant
Definition: type_traits.h:688
FMT_INLINE auto get_iterator(Buf &buf, OutputIt) -> decltype(buf.out())
Definition: core.h:1127
void vformat_to(buffer< Char > &buf, const text_style &ts, basic_string_view< Char > format_str, basic_format_args< buffer_context< type_identity_t< Char > > > args)
Definition: color.h:436
type
Definition: core.h:556
char8_type
Definition: format.h:639
std::string to_string(const T &t)
Definition: base.h:92
cubed< length::millimeter > L
Definition: volume.h:49
Definition: format.h:2192
Specifies if T is a character type.
Definition: core.h:505
Definition: format.h:4210
#define S(label, offset, message)
Definition: Errors.h:119
auto format(wformat_string< T... > fmt, T &&... args) -> std::wstring
Definition: xchar.h:108
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 formatted_size(const S &fmt, T &&... args) -> size_t
Definition: xchar.h:212
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:99
auto format_to(OutputIt out, const S &fmt, T &&... args) -> OutputIt
Definition: xchar.h:156
basic_string_view< wchar_t > wstring_view
Definition: xchar.h:42
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:190
auto format_to_n(OutputIt out, size_t n, const S &fmt, T &&... args) -> format_to_n_result< OutputIt >
Definition: xchar.h:204
basic_memory_buffer< wchar_t > wmemory_buffer
Definition: xchar.h:46
auto to_wstring(const T &value) -> std::wstring
Converts value to std::wstring using the default format for type T.
Definition: xchar.h:251
auto join(It begin, Sentinel end, wstring_view sep) -> join_view< It, Sentinel, wchar_t >
Definition: xchar.h:80
constexpr format_arg_store< wformat_context, T... > make_wformat_args(const T &... args)
Definition: xchar.h:66
void print(std::FILE *f, wformat_string< T... > fmt, T &&... args)
Definition: xchar.h:231
auto runtime(wstring_view s) -> runtime_format_string< wchar_t >
Definition: xchar.h:55
void vprint(std::FILE *f, wstring_view fmt, wformat_args args)
Definition: xchar.h:219
void println(std::FILE *f, wformat_string< T... > fmt, T &&... args)
Definition: xchar.h:240
buffer_context< wchar_t > wformat_context
Definition: xchar.h:44