Internally, Emboss uses a template type called IsChar<> to determine whether a type is safe to use with aliasing operations.
This is based on a misreading of the standard: only char and unsigned char (and, as of C++17, std::byte) can safely alias other types, but IsChar<signed char>::value is true. The type signed char is not alias-safe.
IsChar is also used to determine which types are acceptable to pass into view constructors, so removing signed char from that list is technically a breaking change; however, signed char (and std::int8_t, which is an alias of signed char on any real-world compiler that uses an unsigned plain char type) is rarely used in this context, so it seems unlikely that this would break any actual uses.
The new (... 7 years ago) type std::byte should also be added to the list, though it needs to be guarded by #if __cplusplus >= 201703L until at least 2027.
And given that it should not be true for all character types and only character types, IsChar should probably be renamed to IsAliasSafe or similar.
Internally, Emboss uses a template type called
IsChar<>
to determine whether a type is safe to use with aliasing operations.This is based on a misreading of the standard: only
char
andunsigned char
(and, as of C++17,std::byte
) can safely alias other types, butIsChar<signed char>::value
istrue
. The typesigned char
is not alias-safe.IsChar
is also used to determine which types are acceptable to pass into view constructors, so removingsigned char
from that list is technically a breaking change; however,signed char
(andstd::int8_t
, which is an alias ofsigned char
on any real-world compiler that uses an unsigned plainchar
type) is rarely used in this context, so it seems unlikely that this would break any actual uses.The new (... 7 years ago) type
std::byte
should also be added to the list, though it needs to be guarded by#if __cplusplus >= 201703L
until at least 2027.And given that it should not be
true
for all character types and only character types,IsChar
should probably be renamed toIsAliasSafe
or similar.