On 21.09.2018 17:26, Stefan Ram wrote:
> [snip]
> reinterpret_cast< ::std::uintptr_t >pointer
> static_cast< ::std::uintptr_t >pointer
Both are syntax errors.
When that's fixed the `static_cast` is invalid.
* * *
There was once an issue with the standard's wording for
`reinterpret_cast`, so that Andrei and Herb recommended
static_cast<Ptr_to_A>( static_cast<void*>( ptr_to_B ) )
instead of
reinterpret_cast<Ptr_to_A>( ptr_to_B ) )
However, as I recall, but this is a vague memory, the wording was fixed
in C++11 so that now the two are also formally equivalent, so no longer
is there even a formal reason to use the more convoluted construct.
Cheers!
- Alf