HDK
|
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstring>
#include <limits>
#include <memory>
#include <stdexcept>
#include <stdint.h>
#include "core.h"
Go to the source code of this file.
Namespaces | |
internal | |
std | |
Macros | |
#define | FMT_CLANG_VERSION 0 |
#define | FMT_ICC_VERSION 0 |
#define | FMT_CUDA_VERSION 0 |
#define | FMT_SECURE_SCL 0 |
#define | FMT_HAS_BUILTIN(x) 0 |
#define | FMT_THROW(x) throw x |
#define | FMT_USE_USER_DEFINED_LITERALS 0 |
#define | FMT_UDL_TEMPLATE 0 |
#define | FMT_USE_EXTERN_TEMPLATES |
#define | FMT_USE_TRAILING_RETURN 0 |
#define | FMT_USE_GRISU 0 |
#define | FMT_ALWAYS_INLINE |
#define | FMT_USE_WINDOWS_H 0 |
#define | FMT_STRING(s) |
#define | FMT_FUNC |
Typedefs | |
typedef std::numeric_limits < internal::dummy_int > | internal::fputil |
typedef basic_writer < back_insert_range < internal::buffer > > | writer |
typedef basic_writer < back_insert_range < internal::wbuffer > > | wwriter |
typedef basic_memory_buffer< char > | memory_buffer |
typedef basic_memory_buffer < wchar_t > | wmemory_buffer |
typedef basic_data | internal::data |
typedef basic_format_specs< char > | format_specs |
Enumerations | |
enum | char8_t : unsigned char |
enum | { inline_buffer_size = 500 } |
enum | alignment { ALIGN_DEFAULT, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTER, ALIGN_NUMERIC } |
enum | { SIGN_FLAG = 1, PLUS_FLAG = 2, MINUS_FLAG = 4, HASH_FLAG = 8 } |
Functions | |
template<typename Dest , typename Source > | |
Dest | internal::bit_cast (const Source &source) |
template<typename C > | |
FMT_CONSTEXPR auto | internal::begin (const C &c) -> decltype(c.begin()) |
template<typename T , std::size_t N> | |
FMT_CONSTEXPR T * | internal::begin (T(&array)[N]) FMT_NOEXCEPT |
template<typename C > | |
FMT_CONSTEXPR auto | internal::end (const C &c) -> decltype(c.end()) |
template<typename T , std::size_t N> | |
FMT_CONSTEXPR T * | internal::end (T(&array)[N]) FMT_NOEXCEPT |
dummy_int | internal::isinf (...) |
dummy_int | internal::_finite (...) |
dummy_int | internal::isnan (...) |
dummy_int | internal::_isnan (...) |
template<typename Allocator > | |
Allocator::value_type * | internal::allocate (Allocator &alloc, std::size_t n) |
template<typename T > | |
T | internal::const_check (T value) |
template<typename T > | |
T * | internal::make_checked (T *p, std::size_t) |
template<typename Container > | |
std::enable_if< is_contiguous < Container >::value, typename checked< typename Container::value_type >::type > ::type | internal::reserve (std::back_insert_iterator< Container > &it, std::size_t n) |
template<typename Iterator > | |
Iterator & | internal::reserve (Iterator &it, std::size_t) |
template<typename Char > | |
FMT_CONSTEXPR_DECL const Char * | internal::pointer_from (null_terminating_iterator< Char > it) |
template<typename T > | |
FMT_CONSTEXPR const T * | internal::pointer_from (const T *p) |
template<typename Char > | |
FMT_CONSTEXPR const Char * | internal::pointer_from (null_terminating_iterator< Char > it) |
template<typename T > | |
FMT_CONSTEXPR std::enable_if < std::numeric_limits< T > ::is_signed, bool >::type | internal::is_negative (T value) |
template<typename T > | |
FMT_CONSTEXPR std::enable_if < !std::numeric_limits< T > ::is_signed, bool >::type | internal::is_negative (T) |
unsigned | internal::count_digits (uint64_t n) |
template<typename Char > | |
size_t | internal::count_code_points (basic_string_view< Char > s) |
FMT_API size_t | internal::count_code_points (basic_string_view< char8_t > s) |
char8_t | internal::to_char8_t (char c) |
template<typename OutChar , typename InputIt , typename OutputIt > | |
std::enable_if < !needs_conversion< InputIt, OutChar >::value, OutputIt > ::type | internal::copy_str (InputIt begin, InputIt end, OutputIt it) |
template<typename OutChar , typename InputIt , typename OutputIt > | |
std::enable_if < needs_conversion< InputIt, OutChar >::value, OutputIt > ::type | internal::copy_str (InputIt begin, InputIt end, OutputIt it) |
template<typename Handler > | |
char * | internal::lg (uint32_t n, Handler h) FMT_ALWAYS_INLINE |
template<typename Char > | |
FMT_API Char | internal::thousands_sep_impl (locale_ref loc) |
template<typename Char > | |
Char | internal::thousands_sep (locale_ref loc) |
template<> | |
wchar_t | internal::thousands_sep (locale_ref loc) |
template<typename UInt , typename Char , typename ThousandsSep > | |
Char * | internal::format_decimal (Char *buffer, UInt value, unsigned num_digits, ThousandsSep thousands_sep) |
template<typename OutChar , typename UInt , typename Iterator , typename ThousandsSep > | |
Iterator | internal::format_decimal (Iterator out, UInt value, unsigned num_digits, ThousandsSep sep) |
template<typename OutChar , typename It , typename UInt > | |
It | internal::format_decimal (It out, UInt value, unsigned num_digits) |
template<unsigned BASE_BITS, typename Char , typename UInt > | |
Char * | internal::format_uint (Char *buffer, UInt value, unsigned num_digits, bool upper=false) |
template<unsigned BASE_BITS, typename Char , typename It , typename UInt > | |
It | internal::format_uint (It out, UInt value, unsigned num_digits, bool upper=false) |
template<typename Double > | |
FMT_API std::enable_if< sizeof(Double)==sizeof(uint64_t), bool >::type | internal::grisu2_format (Double value, buffer &buf, core_format_specs) |
template<typename Double > | |
std::enable_if< sizeof(Double)!=sizeof(uint64_t), bool >::type | internal::grisu2_format (Double, buffer &, core_format_specs) |
template<typename Double > | |
void | internal::sprintf_format (Double value, internal::buffer &buffer, core_format_specs spec) |
template<typename Handler > | |
FMT_CONSTEXPR void | internal::handle_int_type_spec (char spec, Handler &&handler) |
template<typename Handler > | |
FMT_CONSTEXPR void | internal::handle_float_type_spec (char spec, Handler &&handler) |
template<typename Char , typename Handler > | |
FMT_CONSTEXPR void | internal::handle_char_specs (const basic_format_specs< Char > *specs, Handler &&handler) |
template<typename Char , typename Handler > | |
FMT_CONSTEXPR void | internal::handle_cstring_type_spec (Char spec, Handler &&handler) |
template<typename Char , typename ErrorHandler > | |
FMT_CONSTEXPR void | internal::check_string_type_spec (Char spec, ErrorHandler &&eh) |
template<typename Char , typename ErrorHandler > | |
FMT_CONSTEXPR void | internal::check_pointer_type_spec (Char spec, ErrorHandler &&eh) |
template<typename Char > | |
FMT_CONSTEXPR bool | internal::is_name_start (Char c) |
template<typename Iterator , typename ErrorHandler > | |
FMT_CONSTEXPR unsigned | internal::parse_nonnegative_int (Iterator &it, ErrorHandler &&eh) |
template<typename Char , typename ErrorHandler > | |
FMT_CONSTEXPR unsigned | internal::parse_nonnegative_int (const Char *&begin, const Char *end, ErrorHandler &&eh) |
template<template< typename > class Handler, typename T , typename Context , typename ErrorHandler > | |
FMT_CONSTEXPR void | internal::set_dynamic_spec (T &value, basic_format_arg< Context > arg, ErrorHandler eh) |
template<typename Iterator , typename IDHandler > | |
FMT_CONSTEXPR Iterator | internal::parse_arg_id (Iterator it, IDHandler &&handler) |
template<typename Char , typename IDHandler > | |
FMT_CONSTEXPR const Char * | internal::parse_arg_id (const Char *begin, const Char *end, IDHandler &&handler) |
template<typename Iterator , typename SpecHandler > | |
FMT_CONSTEXPR Iterator | internal::parse_format_specs (Iterator it, SpecHandler &&handler) |
template<bool IS_CONSTEXPR, typename T , typename Ptr = const T*> | |
FMT_CONSTEXPR bool | internal::find (Ptr first, Ptr last, T value, Ptr &out) |
template<> | |
bool | internal::find< false, char > (const char *first, const char *last, char value, const char *&out) |
template<bool IS_CONSTEXPR, typename Char , typename Handler > | |
FMT_CONSTEXPR void | internal::parse_format_string (basic_string_view< Char > format_str, Handler &&handler) |
template<typename T , typename ParseContext > | |
FMT_CONSTEXPR const ParseContext::char_type * | internal::parse_format_specs (ParseContext &ctx) |
template<typename Char , typename ErrorHandler , typename... Args> | |
FMT_CONSTEXPR bool | internal::do_check_format_string (basic_string_view< Char > s, ErrorHandler eh=ErrorHandler()) |
template<typename... Args, typename S > | |
std::enable_if < is_compile_string< S > ::value >::type | internal::check_format_string (S) |
template<template< typename > class Handler, typename Spec , typename Context > | |
void | internal::handle_dynamic_spec (Spec &value, arg_ref< typename Context::char_type > ref, Context &ctx) |
FMT_API void | format_system_error (internal::buffer &out, int error_code, fmt::string_view message) FMT_NOEXCEPT |
FMT_API void | report_system_error (int error_code, string_view message) FMT_NOEXCEPT |
template<typename T > | |
void | format_decimal (char *&buffer, T value) |
template<typename ArgFormatter , typename Char , typename Context > | |
Context::iterator | vformat_to (typename ArgFormatter::range out, basic_string_view< Char > format_str, basic_format_args< Context > args, internal::locale_ref loc=internal::locale_ref()) |
template<typename T > | |
const void * | ptr (const T *p) |
template<typename It > | |
arg_join< It, char > | join (It begin, It end, string_view sep) |
template<typename It > | |
arg_join< It, wchar_t > | join (It begin, It end, wstring_view sep) |
template<typename T > | |
std::string | to_string (const T &value) |
template<typename T > | |
std::wstring | to_wstring (const T &value) |
template<typename Char , std::size_t SIZE> | |
std::basic_string< Char > | to_string (const basic_memory_buffer< Char, SIZE > &buf) |
template<typename S , typename Char = FMT_CHAR(S)> | |
buffer_context< Char > ::type::iterator | vformat_to (internal::basic_buffer< Char > &buf, const S &format_str, basic_format_args< typename buffer_context< Char >::type > args) |
template<typename S , typename... Args, std::size_t SIZE = inline_buffer_size, typename Char = typename internal::char_t<S>::type> | |
buffer_context< Char > ::type::iterator | format_to (basic_memory_buffer< Char, SIZE > &buf, const S &format_str, const Args &...args) |
template<typename String , typename OutputIt , typename... Args> | |
std::enable_if < internal::is_output_iterator < OutputIt >::value, OutputIt > ::type | vformat_to (OutputIt out, const String &format_str, typename format_args_t< OutputIt, FMT_CHAR(String)>::type args) |
template<typename OutputIt , typename S , typename... Args> | |
std::enable_if < internal::is_string< S > ::value &&internal::is_output_iterator < OutputIt >::value, OutputIt > ::type | format_to (OutputIt out, const S &format_str, const Args &...args) |
template<typename OutputIt , typename Char , typename... Args> | |
format_arg_store< typename format_to_n_context< OutputIt, Char >::type, Args...> | make_format_to_n_args (const Args &...args) |
template<typename OutputIt , typename Char , typename... Args> | |
std::enable_if < internal::is_output_iterator < OutputIt >::value, format_to_n_result< OutputIt > >::type | vformat_to_n (OutputIt out, std::size_t n, basic_string_view< Char > format_str, typename format_to_n_args< OutputIt, Char >::type args) |
template<typename OutputIt , typename S , typename... Args> | |
std::enable_if < internal::is_string< S > ::value &&internal::is_output_iterator < OutputIt >::value, format_to_n_result< OutputIt > >::type | format_to_n (OutputIt out, std::size_t n, const S &format_str, const Args &...args) |
template<typename... Args> | |
std::size_t | formatted_size (string_view format_str, const Args &...args) |
#define FMT_STRING | ( | s | ) |
#define FMT_USE_EXTERN_TEMPLATES |
typedef basic_format_specs<char> format_specs |
typedef basic_memory_buffer<char> memory_buffer |
typedef basic_memory_buffer<wchar_t> wmemory_buffer |
typedef basic_writer<back_insert_range<internal::buffer> > writer |
typedef basic_writer<back_insert_range<internal::wbuffer> > wwriter |
anonymous enum |
enum alignment |
|
inline |
FMT_API void format_system_error | ( | internal::buffer & | out, |
int | error_code, | ||
fmt::string_view | message | ||
) |
Formats an error returned by an operating system or a language runtime, for example a file opening error, and writes it to out in the following form:
.. parsed-literal:: <message>*: *<system-message>*
where *<message>* is the passed message and *<system-message>* is the system message corresponding to the error code. error_code* is a system error code as given by errno
. If error_code is not a valid error code such as -1, the system message may look like "Unknown error -1" and is platform-dependent.
|
inline |
|
inline |
|
inline |
|
inline |
arg_join<It, char> join | ( | It | begin, |
It | end, | ||
string_view | sep | ||
) |
arg_join<It, wchar_t> join | ( | It | begin, |
It | end, | ||
wstring_view | sep | ||
) |
|
inline |
FMT_API void report_system_error | ( | int | error_code, |
string_view | message | ||
) |
std::string to_string | ( | const T & | value | ) |
std::basic_string<Char> to_string | ( | const basic_memory_buffer< Char, SIZE > & | buf | ) |
std::wstring to_wstring | ( | const T & | value | ) |
Context::iterator vformat_to | ( | typename ArgFormatter::range | out, |
basic_string_view< Char > | format_str, | ||
basic_format_args< Context > | args, | ||
internal::locale_ref | loc = internal::locale_ref() |
||
) |
|
inline |
|
inline |
|
inline |