
5 Mar
2011
5 Mar
'11
10:55 a.m.
On Mar 5, 2011, at 2:07 AM, Christopher Jefferson wrote:
On 5 Mar 2011, at 09:48, Joshua Juran wrote:
Metrowerks C++ 2.4.1 thinks the type of (T*)0 is T, rather than T*. But reinterpret_cast works fine.
That is an incredibly strange bug.
Agreed.
This also introduced a bug. (T*)0 is the expected way to get a null pointer of type T*. A reinterpret_cast is incorrect (although in practice likely to work on most machines / compiles)
Does static_cast work? That would be fine instead of the C-style cast.
Yes, thanks for the correction. I'll resend the patch. Josh