
5 May
2012
5 May
'12
3:27 p.m.
On Fri, May 04, 2012 at 05:04:00PM +0000, Richard wrote:
static_cast
(p) where p is void* works perfectly fine. It is always valid to cast a void* to any other type and that's what static_cast<> does -- performs the cast when it is allowed by the rules of the language.
Might it be C that allows arbitrary casts, but only guarantees proper semantics if the type is the correct one? My C-fu is weak, and I know they differ in what they allow. -- Lars Viklund | zao@acc.umu.se