[cfe-dev] Objective-C++11 literal types
Richard Smith
richard at metafoo.co.uk
Thu Dec 1 16:23:58 PST 2011
Hi,
I was surprised to find this in AST::Type::isLiteralType:
// Objective-C lifetime types are not literal types.
if (BaseTy->isObjCRetainableType())
return false;
This is strange, because we do support constant expression evaluation of
Objective-C lifetime types (outside C++11).
So which is correct? Should lifetime types be permitted as literal types, or
should they not be permitted as the type of globals in (Objective-)C? Or is
there some reason why C++11 should treat them differently from other
languages?
Thanks,
Richard
More information about the cfe-dev
mailing list