WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
xchar.h File Reference
#include "color.h"
#include "format.h"
#include "ostream.h"
#include "ranges.h"
#include <cwchar>

Go to the source code of this file.

Classes

struct  detail::format_string_char< S, typename >
struct  detail::format_string_char< S, void_t< decltype(sizeof(detail::to_string_view(std::declval< S >())))> >
struct  detail::format_string_char< S, enable_if_t< std::is_base_of< detail::compile_string, S >::value > >
struct  basic_fstring< Char, T >

Namespaces

namespace  detail
 Converts a string literal into a format string that will be parsed at compile time and converted into efficient formatting code.
namespace  literals

Typedefs

template<typename T>
using detail::is_exotic_char = bool_constant<!std::is_same<T, char>::value>
template<typename S>
using detail::format_string_char_t = typename format_string_char<S>::type
using wstring_view = basic_string_view<wchar_t>
using wformat_parse_context = parse_context<wchar_t>
using wformat_context = buffered_context<wchar_t>
using wformat_args = basic_format_args<wformat_context>
using wmemory_buffer = basic_memory_buffer<wchar_t>
template<typename Char, typename... T>
using basic_format_string = basic_fstring<Char, T...>
template<typename... T>
using wformat_string = typename basic_format_string<wchar_t, T...>::t

Functions

auto detail::write_loc (basic_appender< wchar_t > out, loc_value value, const format_specs &specs, locale_ref loc) -> bool
template<typename Char>
void detail::vformat_to (buffer< Char > &buf, basic_string_view< Char > fmt, basic_format_args< buffered_context< Char > > args, locale_ref loc={})
auto runtime (wstring_view s) -> runtime_format_string< wchar_t >
template<typename... T>
constexpr auto make_wformat_args (T &... args) -> decltype(fmt::make_format_args< wformat_context >(args...))
auto literals::operator""_a (const wchar_t *s, size_t) -> detail::udl_arg< wchar_t >
template<typename It, typename Sentinel>
auto join (It begin, Sentinel end, wstring_view sep) -> join_view< It, Sentinel, wchar_t >
template<typename Range, FMT_ENABLE_IF(!is_tuple_like< Range >::value)>
auto join (Range &&range, wstring_view sep) -> join_view< decltype(std::begin(range)), decltype(std::end(range)), wchar_t >
template<typename T>
auto join (std::initializer_list< T > list, wstring_view sep) -> join_view< const T *, const T *, wchar_t >
template<typename Tuple, FMT_ENABLE_IF(is_tuple_like< Tuple >::value)>
auto join (const Tuple &tuple, basic_string_view< wchar_t > sep) -> tuple_join_view< Tuple, wchar_t >
template<typename Char, FMT_ENABLE_IF(!std::is_same< Char, char >::value)>
auto vformat (basic_string_view< Char > fmt, basic_format_args< buffered_context< Char > > args) -> std::basic_string< Char >
template<typename... T>
auto format (wformat_string< T... > fmt, T &&... args) -> std::wstring
template<typename OutputIt, typename... T>
auto format_to (OutputIt out, wformat_string< T... > fmt, T &&... args) -> OutputIt
template<typename S, typename... T, typename Char = detail::format_string_char_t<S>, FMT_ENABLE_IF(!std::is_same< Char, char >::value && !std::is_same< Char, wchar_t >::value)>
auto format (const S &fmt, T &&... args) -> std::basic_string< Char >
template<typename S, typename Char = detail::format_string_char_t<S>, FMT_ENABLE_IF(detail::is_exotic_char< Char >::value)>
auto vformat (locale_ref loc, const S &fmt, basic_format_args< buffered_context< Char > > args) -> std::basic_string< Char >
template<typename S, typename... T, typename Char = detail::format_string_char_t<S>, FMT_ENABLE_IF(detail::is_exotic_char< Char >::value)>
auto format (locale_ref loc, const S &fmt, T &&... args) -> std::basic_string< Char >
template<typename OutputIt, typename S, typename Char = detail::format_string_char_t<S>, FMT_ENABLE_IF(detail::is_output_iterator< OutputIt, Char >::value && detail::is_exotic_char< Char >::value)>
auto vformat_to (OutputIt out, const S &fmt, basic_format_args< buffered_context< Char > > args) -> OutputIt
template<typename OutputIt, typename S, typename... T, typename Char = detail::format_string_char_t<S>, FMT_ENABLE_IF(detail::is_output_iterator< OutputIt, Char >::value && !std::is_same< Char, char >::value && !std::is_same< Char, wchar_t >::value)>
auto format_to (OutputIt out, const S &fmt, T &&... args) -> OutputIt
template<typename S, typename OutputIt, typename... Args, typename Char = detail::format_string_char_t<S>, FMT_ENABLE_IF(detail::is_output_iterator< OutputIt, Char >::value && detail::is_exotic_char< Char >::value)>
auto vformat_to (OutputIt out, locale_ref loc, const S &fmt, basic_format_args< buffered_context< Char > > args) -> OutputIt
template<typename OutputIt, typename S, typename... T, typename Char = detail::format_string_char_t<S>, bool enable = detail::is_output_iterator<OutputIt, Char>::value && detail::is_exotic_char<Char>::value>
auto format_to (OutputIt out, locale_ref loc, const S &fmt, T &&... args) -> typename std::enable_if< enable, OutputIt >::type
template<typename OutputIt, typename Char, typename... Args, FMT_ENABLE_IF(detail::is_output_iterator< OutputIt, Char >::value && detail::is_exotic_char< Char >::value)>
auto vformat_to_n (OutputIt out, size_t n, basic_string_view< Char > fmt, basic_format_args< buffered_context< Char > > args) -> format_to_n_result< OutputIt >
template<typename OutputIt, typename S, typename... T, typename Char = detail::format_string_char_t<S>, FMT_ENABLE_IF(detail::is_output_iterator< OutputIt, Char >::value && detail::is_exotic_char< Char >::value)>
auto format_to_n (OutputIt out, size_t n, const S &fmt, T &&... args) -> format_to_n_result< OutputIt >
template<typename S, typename... T, typename Char = detail::format_string_char_t<S>, FMT_ENABLE_IF(detail::is_exotic_char< Char >::value)>
auto formatted_size (const S &fmt, T &&... args) -> size_t
void vprint (std::FILE *f, wstring_view fmt, wformat_args args)
void vprint (wstring_view fmt, wformat_args args)
template<typename... T>
void print (std::FILE *f, wformat_string< T... > fmt, T &&... args)
template<typename... T>
void print (wformat_string< T... > fmt, T &&... args)
template<typename... T>
void println (std::FILE *f, wformat_string< T... > fmt, T &&... args)
template<typename... T>
void println (wformat_string< T... > fmt, T &&... args)
auto vformat (text_style ts, wstring_view fmt, wformat_args args) -> std::wstring
template<typename... T>
auto format (text_style ts, wformat_string< T... > fmt, T &&... args) -> std::wstring
void vprint (std::wostream &os, wstring_view fmt, wformat_args args)
template<typename... T>
void print (std::wostream &os, wformat_string< T... > fmt, T &&... args)
template<typename... T>
void println (std::wostream &os, wformat_string< T... > fmt, T &&... args)
template<typename T>
auto to_wstring (const T &value) -> std::wstring
 Converts value to std::wstring using the default format for type T.

Typedef Documentation

◆ basic_format_string

template<typename Char, typename... T>
using basic_format_string = basic_fstring<Char, T...>

◆ wformat_args

◆ wformat_context

◆ wformat_parse_context

◆ wformat_string

template<typename... T>
using wformat_string = typename basic_format_string<wchar_t, T...>::t

◆ wmemory_buffer

◆ wstring_view

using wstring_view = basic_string_view<wchar_t>

Function Documentation

◆ format() [1/4]

template<typename S, typename... T, typename Char = detail::format_string_char_t<S>, FMT_ENABLE_IF(!std::is_same< Char, char >::value && !std::is_same< Char, wchar_t >::value)>
auto format ( const S & fmt,
T &&... args )->std::basic_string< Char >

◆ format() [2/4]

template<typename S, typename... T, typename Char = detail::format_string_char_t<S>, FMT_ENABLE_IF(detail::is_exotic_char< Char >::value)>
auto format ( locale_ref loc,
const S & fmt,
T &&... args )->std::basic_string< Char >
inline

◆ format() [3/4]

template<typename... T>
auto format ( text_style ts,
wformat_string< T... > fmt,
T &&... args )->std::wstring
inline

◆ format() [4/4]

template<typename... T>
auto format ( wformat_string< T... > fmt,
T &&... args )->std::wstring

◆ format_to() [1/3]

template<typename OutputIt, typename S, typename... T, typename Char = detail::format_string_char_t<S>, FMT_ENABLE_IF(detail::is_output_iterator< OutputIt, Char >::value && !std::is_same< Char, char >::value && !std::is_same< Char, wchar_t >::value)>
auto format_to ( OutputIt out,
const S & fmt,
T &&... args )->OutputIt
inline

◆ format_to() [2/3]

template<typename OutputIt, typename S, typename... T, typename Char = detail::format_string_char_t<S>, bool enable = detail::is_output_iterator<OutputIt, Char>::value && detail::is_exotic_char<Char>::value>
auto format_to ( OutputIt out,
locale_ref loc,
const S & fmt,
T &&... args )->typenamestd::enable_if< enable, OutputIt >::type
inline

◆ format_to() [3/3]

template<typename OutputIt, typename... T>
auto format_to ( OutputIt out,
wformat_string< T... > fmt,
T &&... args )->OutputIt

◆ format_to_n()

template<typename OutputIt, typename S, typename... T, typename Char = detail::format_string_char_t<S>, FMT_ENABLE_IF(detail::is_output_iterator< OutputIt, Char >::value && detail::is_exotic_char< Char >::value)>
auto format_to_n ( OutputIt out,
size_t n,
const S & fmt,
T &&... args )->format_to_n_result< OutputIt >
inline

◆ formatted_size()

template<typename S, typename... T, typename Char = detail::format_string_char_t<S>, FMT_ENABLE_IF(detail::is_exotic_char< Char >::value)>
auto formatted_size ( const S & fmt,
T &&... args )->size_t
inline

◆ join() [1/4]

template<typename Tuple, FMT_ENABLE_IF(is_tuple_like< Tuple >::value)>
auto join ( const Tuple & tuple,
basic_string_view< wchar_t > sep )->tuple_join_view< Tuple, wchar_t >

◆ join() [2/4]

template<typename It, typename Sentinel>
auto join ( It begin,
Sentinel end,
wstring_view sep )->join_view< It, Sentinel, wchar_t >

◆ join() [3/4]

template<typename Range, FMT_ENABLE_IF(!is_tuple_like< Range >::value)>
auto join ( Range && range,
wstring_view sep )->join_view< decltype(std::begin(range)), decltype(std::end(range)), wchar_t >

◆ join() [4/4]

template<typename T>
auto join ( std::initializer_list< T > list,
wstring_view sep )->join_view< constT *, constT *, wchar_t >

◆ make_wformat_args()

template<typename... T>
auto make_wformat_args ( T &... args) ->decltype(fmt::make_format_args< wformat_context >(args...))
constexpr

◆ print() [1/3]

template<typename... T>
void print ( std::FILE * f,
wformat_string< T... > fmt,
T &&... args )

◆ print() [2/3]

template<typename... T>
void print ( std::wostream & os,
wformat_string< T... > fmt,
T &&... args )

◆ print() [3/3]

template<typename... T>
void print ( wformat_string< T... > fmt,
T &&... args )

◆ println() [1/3]

template<typename... T>
void println ( std::FILE * f,
wformat_string< T... > fmt,
T &&... args )

◆ println() [2/3]

template<typename... T>
void println ( std::wostream & os,
wformat_string< T... > fmt,
T &&... args )

◆ println() [3/3]

template<typename... T>
void println ( wformat_string< T... > fmt,
T &&... args )

◆ runtime()

auto runtime ( wstring_view s) ->runtime_format_string< wchar_t >
inline

◆ to_wstring()

template<typename T>
auto to_wstring ( const T & value) ->std::wstring
inline

Converts value to std::wstring using the default format for type T.

◆ vformat() [1/3]

template<typename Char, FMT_ENABLE_IF(!std::is_same< Char, char >::value)>
auto vformat ( basic_string_view< Char > fmt,
basic_format_args< buffered_context< Char > > args )->std::basic_string< Char >

◆ vformat() [2/3]

template<typename S, typename Char = detail::format_string_char_t<S>, FMT_ENABLE_IF(detail::is_exotic_char< Char >::value)>
auto vformat ( locale_ref loc,
const S & fmt,
basic_format_args< buffered_context< Char > > args )->std::basic_string< Char >
inline

◆ vformat() [3/3]

auto vformat ( text_style ts,
wstring_view fmt,
wformat_args args )->std::wstring
inline

◆ vformat_to() [1/2]

template<typename OutputIt, typename S, typename Char = detail::format_string_char_t<S>, FMT_ENABLE_IF(detail::is_output_iterator< OutputIt, Char >::value && detail::is_exotic_char< Char >::value)>
auto vformat_to ( OutputIt out,
const S & fmt,
basic_format_args< buffered_context< Char > > args )->OutputIt

◆ vformat_to() [2/2]

template<typename S, typename OutputIt, typename... Args, typename Char = detail::format_string_char_t<S>, FMT_ENABLE_IF(detail::is_output_iterator< OutputIt, Char >::value && detail::is_exotic_char< Char >::value)>
auto vformat_to ( OutputIt out,
locale_ref loc,
const S & fmt,
basic_format_args< buffered_context< Char > > args )->OutputIt
inline

◆ vformat_to_n()

template<typename OutputIt, typename Char, typename... Args, FMT_ENABLE_IF(detail::is_output_iterator< OutputIt, Char >::value && detail::is_exotic_char< Char >::value)>
auto vformat_to_n ( OutputIt out,
size_t n,
basic_string_view< Char > fmt,
basic_format_args< buffered_context< Char > > args )->format_to_n_result< OutputIt >
inline

◆ vprint() [1/3]

void vprint ( std::FILE * f,
wstring_view fmt,
wformat_args args )
inline

◆ vprint() [2/3]

void vprint ( std::wostream & os,
wstring_view fmt,
wformat_args args )
inline

◆ vprint() [3/3]

void vprint ( wstring_view fmt,
wformat_args args )
inline