[cxx-abi-dev] A mangling for std::nullptr_t

Dennis Handly dhandly at cup.hp.com
Thu Mar 4 08:45:03 UTC 2010


>From: Jason Merrill <jason at redhat.com>
>None of the RTTI types match the mangled names of types that use them.

Sorry.  I meant it matches except for the _ZTI prefix:
_ZTIl == type info of long

>> Why not follow the same path?
>>     if (catch_type == typeid(std::nullptr_t))

>I suppose this would also work, and would indeed save us a few words of 
>space in the runtime library.
Jason

It also saves typing in that new class in the header file.  :-)
But it saves a vtable and type_info for that class.

We have a demamgler library using lots of virtual functions and it has
over 19 Kb of C++ metadata.  Where adding a simple tag (with lots of switches)
would save lots of data space.

With the typeid(std::nullptr_t) new case, you probably only need to check
in a few places.



More information about the cxx-abi-dev mailing list