[cfe-dev] C++ Language Support Library

Doug Gregor doug.gregor at gmail.com
Sun Nov 9 15:28:54 PST 2008


On Sun, Nov 9, 2008 at 5:00 PM, Argiris Kirtzidis <akyrtzi at gmail.com> wrote:
> Eli Friedman wrote:
>> On Sun, Nov 9, 2008 at 11:48 AM, Argiris Kirtzidis <akyrtzi at gmail.com> wrote:
>>
>>> Eli Friedman wrote:
>>>
>>>> All right, so ignoring the concept stuff, all we need is type_info,
>>>> nullptr_t, and maybe a few of the exception types depending on the
>>>> implementation.  I'd say just add them to the ASTContext.
>>>>
>>>>
>>> Sema also needs to track whether std::type_info has been defined or not.
>>> We could always add a 'std' namespace and a 'class typeinfo' forward
>>> reference and check whether the 'typeinfo' RecordDecl is defined, but it
>>> seems a bit wasteful to always declare them.
>>>
>>
>> How do the headers define typeinfo?  If it isn't something like
>> "typedef __builtin_typeinfo typeinfo;", it's going to be a pain to
>> deal with...
>>
>
> They define it as a class.

Some implementations also require that it be marked with a special
#pragma, then they check that the contents of the class are what is
expected based on the standard. Frankly, I think this is the easiest
way to go, because it's going to be a pain to put all of the
class-defining logic into Sema by hand.

  - Doug



More information about the cfe-dev mailing list