3 ms·
Two non-const variables will always have different addresses if they are of the same type. Different types can [AFAIR] per the standard theoretically be in dif
by eqvinox 6y ago
Two non-const variables will always have different addresses if they are of the same type. Different types can [AFAIR] per the standard theoretically be in different address spaces, though this is rare in practice.
- a1369209993 6y ago> Different types can [AFAIR] per the standard theoretically be in different address spaces If you can force the types to contain a member of the same type (say, a int or enum foobar_discriminant), the pointers &const_var_foo.disc and &const_var_bar.disc would have to differ for obvious reasons.