C
cpp_weenie
Hello all,
Please consider this expression:
reinterpret_cast<int>(dmp)
Here, dmp is of type int Derived::*.
I have verified that sizeof(dmp) and sizeof(int) are the same.
The compiler balks with the following:
'reinterpret_cast' : cannot convert from 'int Derived::* ' to 'int'
There is no context in which this conversion is possible
Why would this happen?
Shouldn't a reinterpret_cast always succeed as long as the types involved
are the same size?
Thanks,
Dave
Please consider this expression:
reinterpret_cast<int>(dmp)
Here, dmp is of type int Derived::*.
I have verified that sizeof(dmp) and sizeof(int) are the same.
The compiler balks with the following:
'reinterpret_cast' : cannot convert from 'int Derived::* ' to 'int'
There is no context in which this conversion is possible
Why would this happen?
Shouldn't a reinterpret_cast always succeed as long as the types involved
are the same size?
Thanks,
Dave