Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Instantiating templates with dependent arguments

Thanks for the reply Nathan.

> ... The only thing CDT can't instantiate is function bodies.

Yes, but that's a crucial point too. It's the major feature if you want to follow function templates or member functions of template classes. Isn't it?

Regards
Thomas

-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Nathan Ridge
Sent: Dienstag, 21. April 2015 15:48
To: CDT Mailing List
Subject: Re: [cdt-dev] Instantiating templates with dependent arguments

> Hmm interesting, that is really something I can use. I still need to 
> be able to resolve other names than fields.

You can likewise look at the specializations of the declarations of other class members, like methods. The only thing CDT can't instantiate is function bodies.

> But I also found this line in getFields() "CCorePlugin.log(new 
> Exception("Unsafe method call. Instantiation of dependent expressions 
> may not work."));". So I'm wondering, what is the current progress of 
> instantiations of dependent expressions?

It has been implemented since CDT 8.1.1 (bug 299911). As part of that work, some APIs have been upgraded to take an extra parameter representing the point of instantiation (for example, ICPPClassSpecialization.getFields()). The old APIs haven't been removed, however, and there remain some lingering call sites of the old APIs in the CDT codebase. The warning you mention is emitted when one of these old APIs is called.

Regards,
Nate
 		 	   		  
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top