30 #if FMT_GCC_VERSION && FMT_GCC_VERSION < 409 34 template <
typename... Args>
43 template <
typename... Args>
45 const Args&...
args) {
50 constexpr
auto operator"" _format(
const wchar_t* s,
size_t n)
51 -> detail::udl_formatter<wchar_t> {
55 #if FMT_USE_USER_DEFINED_LITERALS && !FMT_USE_NONTYPE_TEMPLATE_PARAMETERS 56 constexpr detail::udl_arg<wchar_t>
operator"" _a(
const wchar_t*
s,
size_t) {
62 template <
typename It,
typename Sentinel>
65 return {begin, end, sep};
68 template <
typename Range>
72 return join(std::begin(range), std::end(range), sep);
78 return join(std::begin(list), std::end(list), sep);
81 template <typename Char, FMT_ENABLE_IF(!std::is_same<Char, char>::value)>
84 -> std::basic_string<Char> {
87 return to_string(buffer);
92 template <
typename S,
typename... Args,
typename Char =
char_t<S>,
94 auto format(
const S& format_str, Args&&...
args) -> std::basic_string<Char> {
99 template <
typename Locale,
typename S,
typename Char =
char_t<S>,
100 FMT_ENABLE_IF(detail::is_locale<Locale>::value&&
101 detail::is_exotic_
char<Char>::value)>
103 const Locale& loc,
const S& format_str,
105 -> std::basic_string<Char> {
109 template <
typename Locale,
typename S,
typename... Args,
113 inline auto format(
const Locale& loc,
const S& format_str, Args&&...
args)
114 -> std::basic_string<Char> {
116 fmt::make_args_checked<Args...>(format_str,
args...));
119 template <
typename OutputIt,
typename S,
typename Char =
char_t<S>,
120 FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, Char>::value&&
121 detail::is_exotic_
char<Char>::value)>
125 auto&& buf = detail::get_buffer<Char>(out);
130 template <
typename OutputIt,
typename S,
typename... Args,
132 FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, Char>::value&&
134 inline auto format_to(OutputIt out,
const S& fmt, Args&&...
args) -> OutputIt {
139 template <
typename S,
typename... Args,
typename Char,
size_t SIZE,
140 typename Allocator,
FMT_ENABLE_IF(detail::is_string<S>::value)>
142 const S& format_str, Args&&...
args) ->
146 return detail::buffer_appender<Char>(buf);
149 template <
typename Locale,
typename S,
typename OutputIt,
typename... Args,
151 FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, Char>::value&&
155 OutputIt out,
const Locale& loc,
const S& format_str,
157 auto&& buf = detail::get_buffer<Char>(out);
163 typename OutputIt,
typename Locale,
typename S,
typename... Args,
165 bool enable = detail::is_output_iterator<OutputIt, Char>::value&&
167 inline auto format_to(OutputIt out,
const Locale& loc,
const S& format_str,
174 template <
typename OutputIt,
typename Char,
typename... Args,
175 FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, Char>::value&&
181 detail::iterator_buffer<OutputIt, Char, detail::fixed_buffer_traits> buf(out,
184 return {buf.out(), buf.count()};
187 template <
typename OutputIt,
typename S,
typename... Args,
189 FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, Char>::value&&
197 template <
typename S,
typename... Args,
typename Char =
char_t<S>,
200 detail::counting_buffer<Char> buf;
209 buffer.push_back(L
'\0');
210 if (std::fputws(buffer.data(), f) == -1)
215 vprint(stdout, fmt, args);
218 template <
typename... T>
236 #endif // FMT_WCHAR_H_ #define FMT_MODULE_EXPORT_END
#define FMT_ENABLE_IF(...)
basic_string_view< wchar_t > wstring_view
typename detail::char_t_impl< S >::type char_t
auto join(It begin, Sentinel end, wstring_view sep) -> join_view< It, Sentinel, wchar_t >
auto formatted_size(const S &fmt, Args &&... args) -> size_t
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, Args &&... args) -> OutputIt
decltype(std::end(std::declval< T & >())) sentinel_t
bool_constant<!std::is_same< T, char >::value > is_exotic_char
buffer_context< wchar_t > wformat_context
#define FMT_END_NAMESPACE
auto format_to_n(OutputIt out, size_t n, const S &fmt, const Args &... args) -> format_to_n_result< OutputIt >
auto get_iterator(Buffer &buf) -> decltype(buf.out())
void vprint(std::FILE *f, wstring_view fmt, wformat_args args)
FMT_INLINE auto to_string_view(const Char *s) -> basic_string_view< Char >
FMT_FUNC void print(std::FILE *f, string_view text)
integral_constant< bool, true > true_type
auto vformat_to(OutputIt out, const S &format_str, basic_format_args< buffer_context< type_identity_t< Char >>> args) -> OutputIt
constexpr format_arg_store< wformat_context, Args... > make_wformat_args(const Args &... args)
typename type_identity< T >::type type_identity_t
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 >
#define FMT_BEGIN_NAMESPACE
auto format(const S &format_str, Args &&... args) -> std::basic_string< Char >
#define FMT_MODULE_EXPORT_BEGIN
std::integral_constant< bool, B > bool_constant
auto to_wstring(const T &value) -> std::wstring