WPILibC++ 2024.3.2
format-inl.h File Reference
#include <algorithm>
#include <cerrno>
#include <climits>
#include <cmath>
#include <exception>
#include <locale>
#include "format.h"

Go to the source code of this file.

Classes

struct  detail::dragonbox::cache_accessor< float >
 
struct  detail::dragonbox::cache_accessor< float >::compute_mul_result
 
struct  detail::dragonbox::cache_accessor< float >::compute_mul_parity_result
 
struct  detail::dragonbox::cache_accessor< double >
 
struct  detail::dragonbox::cache_accessor< double >::compute_mul_result
 
struct  detail::dragonbox::cache_accessor< double >::compute_mul_parity_result
 
struct  formatter< detail::bigint >
 
struct  detail::singleton
 

Namespaces

namespace  detail
 detail namespace with internal helper functions
 
namespace  detail::dragonbox
 

Functions

FMT_FUNC void detail::assert_fail (const char *file, int line, const char *message)
 
FMT_FUNC void detail::throw_format_error (const char *message)
 
FMT_FUNC void detail::format_error_code (detail::buffer< char > &out, int error_code, string_view message) noexcept
 
FMT_FUNC void detail::report_error (format_func func, int error_code, const char *message) noexcept
 
void detail::fwrite_fully (const void *ptr, size_t size, size_t count, FILE *stream)
 
template<typename Char >
FMT_FUNC auto detail::thousands_sep_impl (locale_ref loc) -> thousands_sep_result< Char >
 
template<typename Char >
FMT_FUNC Char detail::decimal_point_impl (locale_ref loc)
 
FMT_FUNC auto detail::write_loc (appender out, loc_value value, const format_specs<> &specs, locale_ref loc) -> bool
 
FMT_FUNC std::system_error vsystem_error (int error_code, string_view fmt, format_args args)
 
template<typename F >
bool detail::operator== (basic_fp< F > x, basic_fp< F > y)
 
FMT_CONSTEXPR uint32_t detail::rotr (uint32_t n, uint32_t r) noexcept
 
FMT_CONSTEXPR uint64_t detail::rotr (uint64_t n, uint32_t r) noexcept
 
uint64_t detail::dragonbox::umul96_upper64 (uint32_t x, uint64_t y) noexcept
 
uint128_fallback detail::dragonbox::umul192_lower128 (uint64_t x, uint128_fallback y) noexcept
 
uint64_t detail::dragonbox::umul96_lower64 (uint32_t x, uint64_t y) noexcept
 
int detail::dragonbox::floor_log10_pow2_minus_log10_4_over_3 (int e) noexcept
 
template<int N>
bool detail::dragonbox::check_divisibility_and_divide_by_pow10 (uint32_t &n) noexcept
 
template<int N>
uint32_t detail::dragonbox::small_division_by_pow10 (uint32_t n) noexcept
 
uint32_t detail::dragonbox::divide_by_10_to_kappa_plus_1 (uint32_t n) noexcept
 
uint64_t detail::dragonbox::divide_by_10_to_kappa_plus_1 (uint64_t n) noexcept
 
FMT_FUNC uint128_fallback detail::dragonbox::get_cached_power (int k) noexcept
 
template<typename T >
bool detail::dragonbox::is_left_endpoint_integer_shorter_interval (int exponent) noexcept
 
FMT_INLINE int detail::dragonbox::remove_trailing_zeros (uint32_t &n, int s=0) noexcept
 
FMT_INLINE int detail::dragonbox::remove_trailing_zeros (uint64_t &n) noexcept
 
template<typename T >
FMT_INLINE decimal_fp< T > detail::dragonbox::shorter_interval_case (int exponent) noexcept
 
template<typename T >
decimal_fp< T > detail::dragonbox::to_decimal (T x) noexcept
 
FMT_FUNC void format_system_error (detail::buffer< char > &out, int error_code, const char *message) noexcept
 \rst Formats an error message for an error returned by an operating system or a language runtime, for example a file opening error, and writes it to out. More...
 
FMT_FUNC void report_system_error (int error_code, const char *message) noexcept
 
FMT_FUNC std::string vformat (string_view fmt, format_args args)
 
FMT_FUNC bool detail::write_console (std::FILE *, string_view)
 
FMT_FUNC void detail::print (std::FILE *f, string_view text)
 
FMT_FUNC void vprint (std::FILE *f, string_view fmt, format_args args)
 
FMT_FUNC void vprint (string_view fmt, format_args args)
 
auto detail::is_printable (uint16_t x, const singleton *singletons, size_t singletons_size, const unsigned char *singleton_lowers, const unsigned char *normal, size_t normal_size) -> bool
 
FMT_FUNC auto detail::is_printable (uint32_t cp) -> bool
 

Variables

struct {
   uint32_t   detail::dragonbox::divisor
 
   int   detail::dragonbox::shift_amount
 
detail::dragonbox::div_small_pow10_infos [] = {{10, 16}, {100, 16}}
 

Function Documentation

◆ format_system_error()

FMT_FUNC void format_system_error ( detail::buffer< char > &  out,
int  error_code,
const char *  message 
)
noexcept

\rst Formats an error message for an error returned by an operating system or a language runtime, for example a file opening error, and writes it to out.

The format is the same as the one used by std::system_error(ec, message) where ec is std::error_code(error_code, std::generic_category()}). It is implementation-defined but normally looks like:

.. 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. \endrst

◆ report_system_error()

FMT_FUNC void report_system_error ( int  error_code,
const char *  message 
)
noexcept

◆ vformat()

FMT_FUNC std::string vformat ( string_view  fmt,
format_args  args 
)

◆ vprint() [1/2]

FMT_FUNC void vprint ( std::FILE *  f,
string_view  fmt,
format_args  args 
)

◆ vprint() [2/2]

FMT_FUNC void vprint ( string_view  fmt,
format_args  args 
)

◆ vsystem_error()

FMT_FUNC std::system_error vsystem_error ( int  error_code,
string_view  fmt,
format_args  args 
)