WPILibC++ 2023.4.3
xchar.h File Reference
#include <cwchar>
#include "format.h"

Go to the source code of this file.

Classes

struct  is_char< wchar_t >
 
struct  is_char< detail::char8_type >
 
struct  is_char< char16_t >
 
struct  is_char< char32_t >
 

Namespaces

namespace  detail
 
namespace  literals
 

Typedefs

template<typename T >
using detail::is_exotic_char = bool_constant<!std::is_same< T, char >::value >
 
using wstring_view = basic_string_view< wchar_t >
 
using wformat_parse_context = basic_format_parse_context< wchar_t >
 
using wformat_context = buffer_context< wchar_t >
 
using wformat_args = basic_format_args< wformat_context >
 
using wmemory_buffer = basic_memory_buffer< wchar_t >
 
template<typename... Args>
using wformat_string = basic_format_string< wchar_t, type_identity_t< Args >... >
 

Functions

auto runtime (wstring_view s) -> basic_runtime< wchar_t >
 
template<typename... Args>
constexpr format_arg_store< wformat_context, Args... > make_wformat_args (const Args &... args)
 
template<typename It , typename Sentinel >
auto join (It begin, Sentinel end, wstring_view sep) -> join_view< It, Sentinel, wchar_t >
 
template<typename Range >
auto join (Range &&range, wstring_view sep) -> join_view< detail::iterator_t< Range >, detail::sentinel_t< 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 Char , FMT_ENABLE_IF(!std::is_same< Char, char >::value) >
auto vformat (basic_string_view< Char > format_str, basic_format_args< buffer_context< type_identity_t< Char > > > args) -> std::basic_string< Char >
 
template<typename... T>
auto format (wformat_string< T... > fmt, T &&... args) -> std::wstring
 
template<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) >
auto format (const S &format_str, Args &&... args) -> std::basic_string< Char >
 
template<typename Locale , typename S , typename Char = char_t<S>, FMT_ENABLE_IF(detail::is_locale< Locale >::value && detail::is_exotic_char< Char >::value) >
auto vformat (const Locale &loc, const S &format_str, basic_format_args< buffer_context< type_identity_t< Char > > > args) -> std::basic_string< Char >
 
template<typename Locale , typename S , typename... Args, typename Char = char_t<S>, FMT_ENABLE_IF(detail::is_locale< Locale >::value && detail::is_exotic_char< Char >::value) >
auto format (const Locale &loc, const S &format_str, Args &&... args) -> std::basic_string< Char >
 
template<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) >
auto vformat_to (OutputIt out, const S &format_str, basic_format_args< buffer_context< type_identity_t< Char > > > args) -> OutputIt
 
template<typename OutputIt , typename S , typename... Args, typename Char = char_t<S>, FMT_ENABLE_IF(detail::is_output_iterator< OutputIt, Char >::value && detail::is_exotic_char< Char >::value) >
auto format_to (OutputIt out, const S &fmt, Args &&... args) -> OutputIt
 
template<typename Locale , typename S , typename OutputIt , typename... Args, typename Char = char_t<S>, FMT_ENABLE_IF(detail::is_output_iterator< OutputIt, Char >::value && detail::is_locale< Locale >::value && detail::is_exotic_char< Char >::value) >
auto vformat_to (OutputIt out, const Locale &loc, const S &format_str, basic_format_args< buffer_context< type_identity_t< Char > > > args) -> OutputIt
 
template<typename OutputIt , typename Locale , typename S , typename... Args, typename Char = char_t<S>, bool enable = detail::is_output_iterator<OutputIt, Char>::value&& detail::is_locale<Locale>::value&& detail::is_exotic_char<Char>::value>
auto format_to (OutputIt out, const Locale &loc, const S &format_str, Args &&... 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 > format_str, basic_format_args< buffer_context< type_identity_t< Char > > > args) -> format_to_n_result< OutputIt >
 
template<typename OutputIt , typename S , typename... Args, typename Char = 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, const Args &... args) -> format_to_n_result< OutputIt >
 
template<typename S , typename... Args, typename Char = char_t<S>, FMT_ENABLE_IF(detail::is_exotic_char< Char >::value) >
auto formatted_size (const S &fmt, Args &&... 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 >
auto to_wstring (const T &value) -> std::wstring
 Converts value to std::wstring using the default format for type T. More...
 

Typedef Documentation

◆ wformat_args

◆ wformat_context

using wformat_context = buffer_context<wchar_t>

◆ wformat_parse_context

◆ wformat_string

template<typename... Args>
using wformat_string = basic_format_string<wchar_t, type_identity_t<Args>...>

◆ wmemory_buffer

◆ wstring_view

using wstring_view = basic_string_view<wchar_t>

Function Documentation

◆ format() [1/3]

template<typename Locale , typename S , typename... Args, typename Char = char_t<S>, FMT_ENABLE_IF(detail::is_locale< Locale >::value && detail::is_exotic_char< Char >::value) >
auto format ( const Locale &  loc,
const S format_str,
Args &&...  args 
) -> std::basic_string<Char>
inline

◆ format() [2/3]

template<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) >
auto format ( const S format_str,
Args &&...  args 
) -> std::basic_string<Char>

◆ format() [3/3]

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

◆ format_to() [1/2]

template<typename OutputIt , typename Locale , typename S , typename... Args, typename Char = char_t<S>, bool enable = detail::is_output_iterator<OutputIt, Char>::value&& detail::is_locale<Locale>::value&& detail::is_exotic_char<Char>::value>
auto format_to ( OutputIt  out,
const Locale &  loc,
const S format_str,
Args &&...  args 
) -> typename std::enable_if<enable, OutputIt>::type
inline

◆ format_to() [2/2]

template<typename OutputIt , typename S , typename... Args, typename Char = char_t<S>, FMT_ENABLE_IF(detail::is_output_iterator< OutputIt, Char >::value && detail::is_exotic_char< Char >::value) >
auto format_to ( OutputIt  out,
const S fmt,
Args &&...  args 
) -> OutputIt
inline

◆ format_to_n()

template<typename OutputIt , typename S , typename... Args, typename Char = 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,
const Args &...  args 
) -> format_to_n_result<OutputIt>
inline

◆ formatted_size()

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

◆ join() [1/3]

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

◆ join() [2/3]

template<typename Range >
auto join ( Range &&  range,
wstring_view  sep 
) -> join_view<detail::iterator_t<Range>, detail::sentinel_t<Range>, wchar_t>

◆ join() [3/3]

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

◆ make_wformat_args()

template<typename... Args>
constexpr format_arg_store< wformat_context, Args... > make_wformat_args ( const Args &...  args)
constexpr

◆ print() [1/2]

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

◆ print() [2/2]

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

◆ runtime()

auto runtime ( wstring_view  s) -> basic_runtime<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/2]

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

◆ vformat() [2/2]

template<typename Locale , typename S , typename Char = char_t<S>, FMT_ENABLE_IF(detail::is_locale< Locale >::value && detail::is_exotic_char< Char >::value) >
auto vformat ( const Locale &  loc,
const S format_str,
basic_format_args< buffer_context< type_identity_t< Char > > >  args 
) -> std::basic_string<Char>
inline

◆ vformat_to() [1/2]

template<typename Locale , typename S , typename OutputIt , typename... Args, typename Char = char_t<S>, FMT_ENABLE_IF(detail::is_output_iterator< OutputIt, Char >::value && detail::is_locale< Locale >::value && detail::is_exotic_char< Char >::value) >
auto vformat_to ( OutputIt  out,
const Locale &  loc,
const S format_str,
basic_format_args< buffer_context< type_identity_t< Char > > >  args 
) -> OutputIt
inline

◆ vformat_to() [2/2]

template<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) >
auto vformat_to ( OutputIt  out,
const S format_str,
basic_format_args< buffer_context< type_identity_t< Char > > >  args 
) -> OutputIt

◆ 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 >  format_str,
basic_format_args< buffer_context< type_identity_t< Char > > >  args 
) -> format_to_n_result<OutputIt>
inline

◆ vprint() [1/2]

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

◆ vprint() [2/2]

void vprint ( wstring_view  fmt,
wformat_args  args 
)
inline