rapidyaml  0.16.0
parseandemitYAML,anddoitfast
Integer specifiers

Classes

struct  c4::fmt::integral_< T >
 format an integral type with a custom radix More...
 
struct  c4::fmt::integral_padded_< T >
 format an integral type with a custom radix, and pad with zeroes on the left More...
 

Functions

template<class T >
integral_< T > c4::fmt::integral (T val, T radix=10)
 format an integral type with a custom radix More...
 
template<class T >
integral_< intptr_t > c4::fmt::integral (T const *val, T radix=10)
 format an integral type with a custom radix More...
 
template<class T >
integral_< intptr_t > c4::fmt::integral (std::nullptr_t, T radix=10)
 format an integral type with a custom radix More...
 
template<class T >
integral_< intptr_t > c4::fmt::hex (T *v)
 format the pointer as an hexadecimal value More...
 
template<class T >
integral_< intptr_t > c4::fmt::hex (T const *v)
 format the pointer as an hexadecimal value More...
 
template<class T >
integral_< T > c4::fmt::hex (T v)
 format the integral_ argument as an hexadecimal value More...
 
template<class T >
integral_< intptr_t > c4::fmt::oct (T const *v)
 format the pointer as an octal value More...
 
template<class T >
integral_< intptr_t > c4::fmt::oct (T *v)
 format the pointer as an octal value More...
 
template<class T >
integral_< T > c4::fmt::oct (T v)
 format the integral_ argument as an octal value More...
 
template<class T >
integral_< intptr_t > c4::fmt::bin (T const *v)
 format the pointer as a binary 0-1 value More...
 
template<class T >
integral_< intptr_t > c4::fmt::bin (T *v)
 format the pointer as a binary 0-1 value More...
 
template<class T >
integral_< T > c4::fmt::bin (T v)
 format the integral_ argument as a binary 0-1 value More...
 

Variables

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

Detailed Description

Function Documentation

template<class T >
integral_<T> c4::fmt::integral ( T  val,
T  radix = 10 
)
inline

format an integral type with a custom radix

Definition at line 128 of file format.hpp.

129 {
130  return integral_<T>(val, radix);
131 }
template<class T >
integral_<intptr_t> c4::fmt::integral ( T const *  val,
T  radix = 10 
)
inline

format an integral type with a custom radix

Definition at line 134 of file format.hpp.

135 {
136  return integral_<intptr_t>(reinterpret_cast<intptr_t>(val), static_cast<intptr_t>(radix));
137 }
template<class T >
integral_<intptr_t> c4::fmt::integral ( std::nullptr_t  ,
T  radix = 10 
)
inline

format an integral type with a custom radix

Definition at line 140 of file format.hpp.

141 {
142  return integral_<intptr_t>(intptr_t(0), static_cast<intptr_t>(radix));
143 }
template<class T >
integral_<intptr_t> c4::fmt::hex ( T *  v)
inline

format the pointer as an hexadecimal value

Definition at line 148 of file format.hpp.

149 {
150  return integral_<intptr_t>(reinterpret_cast<intptr_t>(v), intptr_t(16));
151 }
template<class T >
integral_<intptr_t> c4::fmt::hex ( T const *  v)
inline

format the pointer as an hexadecimal value

Definition at line 154 of file format.hpp.

155 {
156  return integral_<intptr_t>(reinterpret_cast<intptr_t>(v), intptr_t(16));
157 }
template<class T >
integral_<T> c4::fmt::hex ( T  v)
inline

format the integral_ argument as an hexadecimal value

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 167 of file format.hpp.

168 {
169  return integral_<T>(v, T(16));
170 }
template<class T >
integral_<intptr_t> c4::fmt::oct ( T const *  v)
inline

format the pointer as an octal value

Definition at line 174 of file format.hpp.

175 {
176  return integral_<intptr_t>(reinterpret_cast<intptr_t>(v), intptr_t(8));
177 }
template<class T >
integral_<intptr_t> c4::fmt::oct ( T *  v)
inline

format the pointer as an octal value

Definition at line 180 of file format.hpp.

181 {
182  return integral_<intptr_t>(reinterpret_cast<intptr_t>(v), intptr_t(8));
183 }
template<class T >
integral_<T> c4::fmt::oct ( T  v)
inline

format the integral_ argument as an octal value

Definition at line 191 of file format.hpp.

192 {
193  return integral_<T>(v, T(8));
194 }
template<class T >
integral_<intptr_t> c4::fmt::bin ( T const *  v)
inline

format the pointer as a binary 0-1 value

See also
c4::raw() if you want to use a binary memcpy instead of 0-1 formatting

Definition at line 199 of file format.hpp.

200 {
201  return integral_<intptr_t>(reinterpret_cast<intptr_t>(v), intptr_t(2));
202 }
template<class T >
integral_<intptr_t> c4::fmt::bin ( T *  v)
inline

format the pointer as a binary 0-1 value

See also
c4::raw() if you want to use a binary memcpy instead of 0-1 formatting

Definition at line 206 of file format.hpp.

207 {
208  return integral_<intptr_t>(reinterpret_cast<intptr_t>(v), intptr_t(2));
209 }
template<class T >
integral_<T> c4::fmt::bin ( T  v)
inline

format the integral_ argument as a binary 0-1 value

See also
c4::raw() if you want to use a raw memcpy-based binary dump instead of 0-1 formatting

Definition at line 219 of file format.hpp.

220 {
221  return integral_<T>(v, T(2));
222 }

Variable Documentation

integral_<intptr_t> c4::fmt::hex(std::nullptr_t)
inline

format null as an hexadecimal value

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 160 of file format.hpp.

Referenced by sample_formatting().

161 {
162  return integral_<intptr_t>(0, intptr_t(16));
163 }
integral_<intptr_t> c4::fmt::oct(std::nullptr_t)
inline

format null as an octal value

Definition at line 185 of file format.hpp.

Referenced by sample_formatting().

186 {
187  return integral_<intptr_t>(intptr_t(0), intptr_t(8));
188 }
integral_<intptr_t> c4::fmt::bin(std::nullptr_t)
inline

format null as a binary 0-1 value

See also
c4::raw() if you want to use a binary memcpy instead of 0-1 formatting

Definition at line 212 of file format.hpp.

Referenced by sample_formatting().

213 {
214  return integral_<intptr_t>(intptr_t(0), intptr_t(2));
215 }