[aspectc-user] FORWARDED: Template & namespace: bad combo for function resolution

Olaf Spinczyk Olaf.Spinczyk at informatik.uni-erlangen.de
Thu Feb 10 22:10:24 CET 2005


Hi,

Olaf Spinczyk wrote:
> Hi,
> 
> here I forward a mail by Jeremy Buisson.
> 
> Jeremy, please subscribe to the AspectC++ user mailing list before you 
> post something. Posts by non-members are normally discarded automatically.
> 
> Olaf
> 
> -----
> Hi all,
> 
> I found what I consider to be a bug in the PUMA C++ semantic analyser. 
> Indeed, it does not seem to resolve functions that are templates and 
> reside in a namespace. Typically, the following codes:
> 
> struct S;
> namespace N {
>  template <typename T> void f();
> }
> void g() {
>  N::f<S>();
> }
> 
> ends with "error: no matching function for call to `f'", whereas it 
> should not. What is interesting is that if you either remove the 
> namespace or the template, it works well ! The same if I put a "using 
> namespace N;" directive and remove the "N::" prefix. It seems like this 
> prefix is the real source of the problem.
> 
> I did not find it in archives.
> 
> My version : PUMA 0.9/g++
> 
> Sincerely,

Matthias told me that this problem is fixed in version 0.9.1, which was 
released a few minutes ago.

Olaf



More information about the aspectc-user mailing list