util::quantities::datasize_literals Namespace Reference

Literal constants for data size quantities. More...

Functions

constexpr byte operator""_B (long double v)
 Literal second value. More...
 
constexpr byte operator""_B (unsigned long long int v)
 
constexpr kibibyte operator""_kiB (long double v)
 Literal kibibyte value. More...
 
constexpr kibibyte operator""_kiB (unsigned long long int v)
 
constexpr mebibyte operator""_MiB (long double v)
 Literal mebibyte value. More...
 
constexpr mebibyte operator""_MiB (unsigned long long int v)
 
constexpr gibibyte operator""_GiB (long double v)
 Literal gibibyte value. More...
 
constexpr gibibyte operator""_GiB (unsigned long long int v)
 
constexpr tebibyte operator""_TiB (long double v)
 Literal tebibyte value. More...
 
constexpr tebibyte operator""_TiB (unsigned long long int v)
 
constexpr pebibyte operator""_PiB (long double v)
 Literal pebibyte value. More...
 
constexpr pebibyte operator""_PiB (unsigned long long int v)
 
constexpr exbibyte operator""_EiB (long double v)
 Literal exbibyte value. More...
 
constexpr exbibyte operator""_EiB (unsigned long long int v)
 

Detailed Description

Literal constants for data size quantities.

These functions allow a simplified syntax for specifying a data size quantity. In order to use these, their namespace must be used:

// definition of `util::quantities::byte` constant:
constexpr auto s_B = 12_B;
// assignment (likely to a quantity) of
// `util::quantities::kibibyte{512}`
s_B = 512_kiB;

Function Documentation

constexpr byte util::quantities::datasize_literals::operator""_B ( long double  v)

Literal second value.

Definition at line 228 of file datasize.h.

229  { return byte{ static_cast<unsigned long long int>(v) }; }
byte_as<> byte
Type of data size stored in bytes, in long long precision.
Definition: datasize.h:98
constexpr byte util::quantities::datasize_literals::operator""_B ( unsigned long long int  v)

Definition at line 230 of file datasize.h.

231  { return byte{ v }; }
byte_as<> byte
Type of data size stored in bytes, in long long precision.
Definition: datasize.h:98
constexpr exbibyte util::quantities::datasize_literals::operator""_EiB ( long double  v)

Literal exbibyte value.

Definition at line 276 of file datasize.h.

277  { return exbibyte{ static_cast<unsigned long long int>(v) }; }
exbibyte_as<> exbibyte
Type of data size stored in exbibytes, in long long precision.
Definition: datasize.h:200
constexpr exbibyte util::quantities::datasize_literals::operator""_EiB ( unsigned long long int  v)

Definition at line 278 of file datasize.h.

279  { return exbibyte{ v }; }
exbibyte_as<> exbibyte
Type of data size stored in exbibytes, in long long precision.
Definition: datasize.h:200
constexpr gibibyte util::quantities::datasize_literals::operator""_GiB ( long double  v)

Literal gibibyte value.

Definition at line 252 of file datasize.h.

253  { return gibibyte{ static_cast<unsigned long long int>(v) }; }
gibibyte_as<> gibibyte
Type of data size stored in pebibytes, in long long precision.
Definition: datasize.h:149
constexpr gibibyte util::quantities::datasize_literals::operator""_GiB ( unsigned long long int  v)

Definition at line 254 of file datasize.h.

255  { return gibibyte{ v }; }
gibibyte_as<> gibibyte
Type of data size stored in pebibytes, in long long precision.
Definition: datasize.h:149
constexpr kibibyte util::quantities::datasize_literals::operator""_kiB ( long double  v)

Literal kibibyte value.

Definition at line 236 of file datasize.h.

237  { return kibibyte{ static_cast<unsigned long long int>(v) }; }
kibibyte_as<> kibibyte
Type of data size stored in kibibytes, in long long precision.
Definition: datasize.h:115
constexpr kibibyte util::quantities::datasize_literals::operator""_kiB ( unsigned long long int  v)

Definition at line 238 of file datasize.h.

239  { return kibibyte{ v }; }
kibibyte_as<> kibibyte
Type of data size stored in kibibytes, in long long precision.
Definition: datasize.h:115
constexpr mebibyte util::quantities::datasize_literals::operator""_MiB ( long double  v)

Literal mebibyte value.

Definition at line 244 of file datasize.h.

245  { return mebibyte{ static_cast<unsigned long long int>(v) }; }
mebibyte_as<> mebibyte
Type of data size stored in mebibytes, in long long precision.
Definition: datasize.h:132
constexpr mebibyte util::quantities::datasize_literals::operator""_MiB ( unsigned long long int  v)

Definition at line 246 of file datasize.h.

247  { return mebibyte{ v }; }
mebibyte_as<> mebibyte
Type of data size stored in mebibytes, in long long precision.
Definition: datasize.h:132
constexpr pebibyte util::quantities::datasize_literals::operator""_PiB ( long double  v)

Literal pebibyte value.

Definition at line 268 of file datasize.h.

269  { return pebibyte{ static_cast<unsigned long long int>(v) }; }
pebibyte_as<> pebibyte
Type of data size stored in pebibytes, in long long precision.
Definition: datasize.h:183
constexpr pebibyte util::quantities::datasize_literals::operator""_PiB ( unsigned long long int  v)

Definition at line 270 of file datasize.h.

271  { return pebibyte{ v }; }
pebibyte_as<> pebibyte
Type of data size stored in pebibytes, in long long precision.
Definition: datasize.h:183
constexpr tebibyte util::quantities::datasize_literals::operator""_TiB ( long double  v)

Literal tebibyte value.

Definition at line 260 of file datasize.h.

261  { return tebibyte{ static_cast<unsigned long long int>(v) }; }
tebibyte_as<> tebibyte
Type of data size stored in tebibytes, in long long precision.
Definition: datasize.h:166
constexpr tebibyte util::quantities::datasize_literals::operator""_TiB ( unsigned long long int  v)

Definition at line 262 of file datasize.h.

263  { return tebibyte{ v }; }
tebibyte_as<> tebibyte
Type of data size stored in tebibytes, in long long precision.
Definition: datasize.h:166