Go to the documentation of this file.
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
53 template <
typename... Args>
65 template <
typename... T>
72 #if FMT_USE_USER_DEFINED_LITERALS && !FMT_USE_NONTYPE_TEMPLATE_ARGS
73 constexpr
auto operator""_a(
const wchar_t*
s,
size_t)
74 -> detail::udl_arg<wchar_t> {
80 template <
typename It,
typename Sentinel>
83 return {begin, end, sep};
86 template <
typename Range>
90 return join(std::begin(range), std::end(range), sep);
96 return join(std::begin(list), std::end(list), sep);
99 template <
typename Char, FMT_ENABLE_IF(!std::is_same<Char,
char>::value)>
102 -> std::basic_string<Char> {
108 template <
typename... T>
115 template <
typename S,
typename... T,
typename Char =
char_t<S>,
117 !std::is_same<Char, wchar_t>::value)>
118 auto format(
const S& format_str, T&&...
args) -> std::basic_string<Char> {
123 template <
typename Locale,
typename S,
typename Char =
char_t<S>,
124 FMT_ENABLE_IF(detail::is_locale<Locale>::value&&
125 detail::is_exotic_
char<Char>::value)>
127 const Locale& loc,
const S& format_str,
129 -> std::basic_string<Char> {
133 template <
typename Locale,
typename S,
typename... T,
typename Char =
char_t<S>,
136 inline auto format(
const Locale& loc,
const S& format_str, T&&...
args)
137 -> std::basic_string<Char> {
142 template <
typename OutputIt,
typename S,
typename Char =
char_t<S>,
143 FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, Char>::value&&
144 detail::is_exotic_
char<Char>::value)>
148 auto&& buf = detail::get_buffer<Char>(out);
153 template <
typename OutputIt,
typename S,
typename... T,
162 template <
typename Locale,
typename S,
typename OutputIt,
typename... Args,
165 detail::is_locale<Locale>::value&&
168 OutputIt out,
const Locale& loc,
const S& format_str,
170 auto&& buf = detail::get_buffer<Char>(out);
176 template <
typename OutputIt,
typename Locale,
typename S,
typename... T,
179 detail::is_locale<Locale>::value &&
181 inline auto format_to(OutputIt out,
const Locale& loc,
const S& format_str,
188 template <
typename OutputIt,
typename Char,
typename... Args,
198 return {buf.out(), buf.count()};
201 template <
typename OutputIt,
typename S,
typename... T,
211 template <
typename S,
typename... T,
typename Char =
char_t<S>,
223 buf.push_back(L
'\0');
224 if (std::fputws(buf.data(),
f) == -1)
232 template <
typename... T>
241 template <
typename... T>
253 template <
typename T>
inline auto to_wstring(
const T& value) -> std::wstring {
259 #endif // FMT_XCHAR_H_
void print(std::FILE *f, wformat_string< T... > fmt, T &&... args)
auto join(It begin, Sentinel end, wstring_view sep) -> join_view< It, Sentinel, wchar_t >
auto format_to_n(OutputIt out, size_t n, const S &fmt, T &&... args) -> format_to_n_result< OutputIt >
FMT_INLINE auto to_string_view(const Char *s) -> basic_string_view< Char >
auto vformat(basic_string_view< Char > format_str, basic_format_args< buffer_context< type_identity_t< Char >>> args) -> std::basic_string< Char >
auto format_to(OutputIt out, const S &fmt, T &&... args) -> OutputIt
auto vformat_to(OutputIt out, const S &format_str, basic_format_args< buffer_context< type_identity_t< Char >>> args) -> OutputIt
FMT_FUNC auto write_loc(appender out, loc_value value, const format_specs<> &specs, locale_ref loc) -> bool
auto runtime(wstring_view s) -> runtime_format_string< wchar_t >
integral_constant< bool, true > true_type
void println(std::FILE *f, wformat_string< T... > fmt, T &&... args)
FMT_INLINE auto get_iterator(Buf &buf, OutputIt) -> decltype(buf.out())
buffer_context< wchar_t > wformat_context
auto format(wformat_string< T... > fmt, T &&... args) -> std::wstring
#define FMT_ENABLE_IF(...)
auto formatted_size(const S &fmt, T &&... args) -> size_t
#define FMT_END_NAMESPACE
constexpr auto make_format_args(T &... args) -> format_arg_store< Context, remove_cvref_t< T >... >
typename type_identity< T >::type type_identity_t
constexpr auto make_wformat_args(const T &... args) -> format_arg_store< wformat_context, T... >
auto vformat(const Locale &loc, basic_string_view< Char > fmt, basic_format_args< buffer_context< type_identity_t< Char >>> args) -> std::basic_string< Char >
void vprint(std::FILE *f, wstring_view fmt, wformat_args args)
basic_string_view< wchar_t > wstring_view
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 >
std::integral_constant< bool, B > bool_constant
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)
std::string to_string(const std::string &arg)
#define FMT_BEGIN_NAMESPACE
auto to_wstring(const T &value) -> std::wstring
basic_memory_buffer< wchar_t > wmemory_buffer
typename detail::char_t_impl< S >::type char_t
decltype(std::end(std::declval< T & >())) sentinel_t
bool_constant<!std::is_same< T, char >::value > is_exotic_char
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:48