
24 Oct
2007
24 Oct
'07
2:14 p.m.
Markus Schöpflin wrote:
Peter Dimov wrote:
Markus Schöpflin wrote:
Hmm, have a look at this:
---%<--- template <class T> struct foo { void bar() { foobar(); } };
This call to foobar is not dependent on T. Try
template <class T> struct foo { void bar( T * p ) { foobar( p ); } };
OK, what about this:
---%<--- template <class T> struct foo { T *p; void bar() { foobar(p); } };
void foobar(int *p) {}
void argl() { foo<int> f; f.bar(); } --->%---
I don't think lookup works with built-in types. Try the above with e.g. "struct bar{};" instead of "int". / Johan