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

Olaf Spinczyk Olaf.Spinczyk at informatik.uni-erlangen.de
Tue Feb 8 21:34:56 CET 2005


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,
-- 
Jeremy



More information about the aspectc-user mailing list