rapidyaml 0.14.0
parse and emit YAML, and do it fast
Loading...
Searching...
No Matches
c4::fmt Namespace Reference

Classes

struct  boolalpha_
struct  integral_
 format an integral type with a custom radix More...
struct  integral_padded_
 format an integral type with a custom radix, and pad with zeroes on the left More...
struct  overflow_checked_
struct  real_
struct  raw_wrapper_
struct  left_
struct  center_
struct  right_

Typedefs

using const_raw_wrapper = raw_wrapper_<cbyte>
using raw_wrapper = raw_wrapper_<byte>

Functions

template<class T>
boolalpha_ boolalpha (T const &val=false)
 tag function to mark a variable to be written as an alphabetic boolean, ie as either true or false
template<class T>
integral_< T > integral (T val, T radix=10)
 format an integral type with a custom radix
template<class T>
integral_< intptr_t > integral (T const *val, T radix=10)
 format an integral type with a custom radix
template<class T>
integral_< intptr_t > integral (std::nullptr_t, T radix=10)
 format an integral type with a custom radix
template<class T>
integral_< intptr_t > hex (T *v)
 format the pointer as an hexadecimal value
template<class T>
integral_< intptr_t > hex (T const *v)
 format the pointer as an hexadecimal value
template<class T>
integral_< T > hex (T v)
template<class T>
integral_< intptr_t > oct (T const *v)
 format the pointer as an octal value
template<class T>
integral_< intptr_t > oct (T *v)
 format the pointer as an octal value
template<class T>
integral_< T > oct (T v)
 format the integral_ argument as an octal value
template<class T>
integral_< intptr_t > bin (T const *v)
 format the pointer as a binary 0-1 value
template<class T>
integral_< intptr_t > bin (T *v)
 format the pointer as a binary 0-1 value
template<class T>
integral_< T > bin (T v)
 format the integral_ argument as a binary 0-1 value
template<class T>
integral_padded_< T > zpad (T val, size_t num_digits)
 pad the argument with zeroes on the left, with decimal radix
template<class T>
integral_padded_< T > zpad (integral_< T > val, size_t num_digits)
 pad the argument with zeroes on the left
integral_padded_< intptr_t > zpad (std::nullptr_t, size_t num_digits)
 pad the argument with zeroes on the left
template<class T>
integral_padded_< intptr_t > zpad (T const *val, size_t num_digits)
 pad the argument with zeroes on the left
template<class T>
integral_padded_< intptr_t > zpad (T *val, size_t num_digits)
template<class T>
overflow_checked_< T > overflow_checked (T &val)
template<class T>
real_< T > real (T val, int precision, RealFormat_e fmt=FTOA_FLOAT)
const_raw_wrapper craw (cblob data, size_t alignment=alignof(max_align_t))
 mark a variable to be written in raw binary format, using memcpy
const_raw_wrapper raw (cblob data, size_t alignment=alignof(max_align_t))
 mark a variable to be written in raw binary format, using memcpy
template<class T>
const_raw_wrapper craw (T const &data, size_t alignment=alignof(T))
 mark a variable to be written in raw binary format, using memcpy
template<class T>
const_raw_wrapper raw (T const &data, size_t alignment=alignof(T))
 mark a variable to be written in raw binary format, using memcpy
raw_wrapper raw (blob data, size_t alignment=alignof(max_align_t))
 mark a variable to be read in raw binary format, using memcpy
template<class T>
raw_wrapper raw (T &data, size_t alignment=alignof(T))
 mark a variable to be read in raw binary format, using memcpy
template<class T>
left_< T > left (T val, size_t width, char padchar=' ')
 tag type to mark an argument to be aligned left.
template<class T>
center_< T > center (T val, size_t width, char padchar=' ')
 tag function to mark an argument to be aligned center
template<class T>
right_< T > right (T val, size_t width, char padchar=' ')
 tag function to mark an argument to be aligned right

Variables

integral_< intptr_t > hex (std::nullptr_t)
 format null as an hexadecimal value
integral_< intptr_t > oct (std::nullptr_t)
 format null as an octal value
integral_< intptr_t > bin (std::nullptr_t)
 format null as a binary 0-1 value