pub enum Keying {
Exact,
PointersTogether,
}Expand description
What is treated as one type when deciding whether a granule agrees with itself.
Variants§
Exact
Two bytes agree when their types are the same after typedefs and qualifiers are resolved and an enumeration is replaced by what it is represented in.
Qualifiers go because an effective type has none: writing through a const int * and
through an int * stores the same effective type, and 6.5p6 says so. Enumerations go
because an enumeration is compatible with an implementation-defined integer type and
keeping them apart would count a real structure as mixed over a distinction no access
can observe.
PointersTogether
The same, and additionally every pointer type is one type.
Worth reporting separately because it is the one classification choice with a large
effect on the answer and no obviously right side. A plane that distinguishes char *
from struct Foo * catches a type confusion between them; a plane that does not is
cheaper, and how much cheaper is what the two numbers say.