Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Make LookupData.setTemplateArguments public

Hi Michi

I mean the correct resolving of inner(value) in the following simple example when following the instantiation with T=int so I don't get a deferred binding.
void inner (int i) {}
void inner (double d) {}

template <typename T>
void outer(T value) {

int main() {

To resolve the inner(value) call for T=int I create a subclass of LookupData and replace the argument and some other things so CPPSemantics.resolveFunction resolves to inner(int).

See this thread for more info This is used in a colleague's and mine's plug-in shown here (status from a few months back). The resolution of class templates works differently and unfortunately not with subclassing LookupData. Currently I'm implementing the resolution of variadic templates and planned are some SFINAE related resolution features.

What are you implementing or planning to implement/change?


On Fri, 11 Sep 2015 10:42 scalpel4k <scalpel4k@xxxxxxxxx> wrote:

Hi Marco,


would you share with us what 'resolve template argument dependent function calls' exactly means. Because, I also have some issues concerning template resolution on my agenda ...


thx Michi


On Friday, 11 September 2015 07:59:54 CEST Marco Syfrig wrote:

> Hi list


> This commit


> 2787a2158a919512e7f27df3 changed

> LookupData.fTemplateArguments from public to private and introduced a

> public getter and a package visible setter. I have a subclass of LookupData

> in my plug-in to influence the resolution process to be able to resolve

> template argument dependent function calls. And changing

> LookupData.fTemplateArguments is necessary for some calls. All other

> necessary setters are public.


> Is it possible to change LookupData.setTemplateArguments(...) from package

> visible to public? Does something speak against it?

> Even better would be to change all current private members to protected to

> allow to influence the resolution process easier (while also having all

> setters public) without changing the existing code for the resolution. On

> the other hand I guess I’m the only one doing this…


> Thanks for your comments

> Marco


cdt-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top