2 ms·
C11 has static_assert: https://gcc.godbolt.org/z/E3bGc95o3 https://gcc.godbolt.org/z/E3bGc95o3 Is also has _Generic() so you can roll up a family of endianness
by kevin_thibedeau 6y ago
C11 has static_assert: https://gcc.godbolt.org/z/E3bGc95o3 https://gcc.godbolt.org/z/E3bGc95o3
Is also has _Generic() so you can roll up a family of endianness conversion functions and safely change types without blowing up somewhere else with a hardcoded conversion routine.