LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
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)
 Literal second value. More...
 
constexpr kibibyte operator""_kiB (long double v)
 Literal kibibyte value. More...
 
constexpr kibibyte operator""_kiB (unsigned long long int v)
 Literal kibibyte value. More...
 
constexpr mebibyte operator""_MiB (long double v)
 Literal mebibyte value. More...
 
constexpr mebibyte operator""_MiB (unsigned long long int v)
 Literal mebibyte value. More...
 
constexpr gibibyte operator""_GiB (long double v)
 Literal gibibyte value. More...
 
constexpr gibibyte operator""_GiB (unsigned long long int v)
 Literal gibibyte value. More...
 
constexpr tebibyte operator""_TiB (long double v)
 Literal tebibyte value. More...
 
constexpr tebibyte operator""_TiB (unsigned long long int v)
 Literal tebibyte value. More...
 
constexpr pebibyte operator""_PiB (long double v)
 Literal pebibyte value. More...
 
constexpr pebibyte operator""_PiB (unsigned long long int v)
 Literal pebibyte value. More...
 
constexpr exbibyte operator""_EiB (long double v)
 Literal exbibyte value. More...
 
constexpr exbibyte operator""_EiB (unsigned long long int v)
 Literal exbibyte value. More...
 

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 223 of file datasize.h.

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

Literal second value.

Definition at line 227 of file datasize.h.

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

Literal exbibyte value.

Definition at line 295 of file datasize.h.

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

Literal exbibyte value.

Definition at line 299 of file datasize.h.

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

Literal gibibyte value.

Definition at line 259 of file datasize.h.

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

Literal gibibyte value.

Definition at line 263 of file datasize.h.

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

Literal kibibyte value.

Definition at line 235 of file datasize.h.

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

Literal kibibyte value.

Definition at line 239 of file datasize.h.

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

Literal mebibyte value.

Definition at line 247 of file datasize.h.

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

Literal mebibyte value.

Definition at line 251 of file datasize.h.

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

Literal pebibyte value.

Definition at line 283 of file datasize.h.

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

Literal pebibyte value.

Definition at line 287 of file datasize.h.

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

Literal tebibyte value.

Definition at line 271 of file datasize.h.

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

Literal tebibyte value.

Definition at line 275 of file datasize.h.

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