[cfe-commits] r76776 - /cfe/trunk/lib/AST/DeclCXX.cpp

Sebastian Redl sebastian.redl at getdesigned.at
Sat Jul 25 00:47:50 PDT 2009


Daniel Dunbar wrote:
> On Wed, Jul 22, 2009 at 1:25 PM, Fariborz Jahanian<fjahanian at apple.com> wrote:
>   
>> +    const void *Key = reinterpret_cast<const void *>(
>> +                                          VBase->getType()->getAsRecordType());
>>     
>
> I don't think this case is necessary?
>   
Assuming Daniel meant "cast" here, a general note: conversion to void*
is implicit, and if you have to do it explicitly, use a static_cast.
Conversion from void* should also use static_cast. Depending on how you
interpret "pointer to an object", you could even argue that the standard
doesn't allow reinterpret_cast from/to void*.

Sebastian



More information about the cfe-commits mailing list