What is the correct syntax to overload (or whatever is actually is) std::hex
, so that its functionality can be extended to non standard integers? i wrote this version of uint128_t
std::hex is just a manipulator which set some of the formatting flags on the stream. You can get them using ios_base::flags() and use the result in your operator<<. You probably should also use ios_base::width and ios_base::precision.
If you want more settings than what is provided, ios_base::xalloc, ios_base::iword, ios_base::pword furnish a path to extensions for your manipulators and insertors.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With