Note that earlier similar questions I found were before C++11 and/or included UB and/or could not be a constexpr.
Not a dup of Is there a way to do a C++ style compile-time assertion to determine machine's endianness? or similar
AFAIK there is little endian, big endian, and other. At a minimum I need to at least not compile if other, even better if other architectures can be added
constexpr and endianness was asked earlier and does not include other, which would leave other architectures ill defined as one or the other
Basically I want to be able to specialize a template based on the target architecture's endianness
Aucun commentaire:
Enregistrer un commentaire