[cfe-dev] Getting the FieldDecl from a CXXDependentScopeMemberExpr

Adrien Chauve adrien.chauve at gmail.com
Wed Jun 22 23:49:31 PDT 2011


On Wed, Jun 22, 2011 at 20:26, Douglas Gregor <dgregor at apple.com> wrote:
>
> On Jun 22, 2011, at 10:05 AM, Adrien Chauve wrote:
>
>> Thanks a lot!
>>
>> If I understand well, the AST is of little help for dependent names
>> inside template classes.
>
> Correct. The language is of little help here, either, since it's a fundamental part of the C++ template model.
>
>> Is there any tool to deal with it? Without instanciation, can we do
>> anything with class templates?
>
>
> Not really. You could guess by looking into the primary templates, but the answers you get will be wrong if any specializations come along, and you may not even be able to get enough type information to determine which primary template to look in.
>
>        - Doug
>

Thanks!

By any chance, would it be possible to try and instantiate a primary
template with a list of dumb template parameter types (say ints), skip
it if it fails, and if there is no specialization and the instatiation
succeeds, draw some conclusions on the primary template?

Adrien




More information about the cfe-dev mailing list