|
From: | Vertleyb |
Subject: | problem overloading function template using typedef |
Date: | Thu, 25 Sep 2003 22:42:14 -0400 |
Hi all,
I am having a problem trying to overload a function
template using a typedef such as:
template<class T>
struct A {}; template<class T>
struct B { typedef A<T> type; }; template<class T>
void foo(const typename B<T>::type&) //void foo(const A<T>&) -- this works, but this is not what I need {} void
bar()
{ foo(B<int>::type()); } The g++ 3.3.1 complains about the above code with
the following message:
error: no matching function for call to
`foo(A<int>)'
Am I missing something?
Thanks in advance,
Arkadiy
|
[Prev in Thread] | Current Thread | [Next in Thread] |