Being a GCC user, I've just noticed clang supports a uint24_t
type (it's in their stdint.h
anyway).
How does that work? I mean, is it supported purely internally, as a language extension, or is it implemented like a C++ class would, with some abstraction over 3 bytes or a 16-bit value and another 8-bit value? And - how possible is it to 'yank' such an implementation and use it myself, with GCC?
Note:
- I'm looking to have a uint24_t-like class in modern C++ (or a
uint_t<N>
more generally); my alternative is rolling my own. - You can
s/uint/int/g;
if you like in this question.