Helper class to display human readable bit sizes. More...
#include <wipal/tool/si.hh>
Public Member Functions | |
SI_unit (uint64_t) | |
template<size_t OneRHSUnitInBits> | |
SI_unit (const SI_unit< OneRHSUnitInBits > &) | |
uint64_t | bits () const |
uint64_t | bytes () const |
template<> | |
const char * | abbrev_ |
template<> | |
const char * | abbrev_ |
template<> | |
const char * | abbrev_ |
template<> | |
const char * | abbrev_ |
template<> | |
const char * | abbrev_ |
template<> | |
const char * | abbrev_ |
template<> | |
const char * | abbrev_ |
template<> | |
const char * | abbrev_ |
template<> | |
const char * | abbrev_ |
template<> | |
const char * | abbrev_ |
Static Public Member Functions | |
static std::string | abbrev () |
Helper class to display human readable bit sizes.
E.g.
typedef SI_unit<8> byte; typedef SI_unit<8192> kilobyte; const int i = 65536; std::cout << i << " bits is " << byte (i) << " and " << kilobyte (i) << std::endl;