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

> 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
 		 	   		  

Back to the top