A
Arkadiy Vertleyb
Hi all,
I am having a problem trying to overload a function template, based on
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 bar()
{
foo(B<int>::type());
}
g++ 3.3.1 complains at the above code with the following message:
no matching function for call to `foo(A<int>)'
Similar code works with no problem in VC6.
Am I missing something?
Thanks in advance,
Arkadiy
I am having a problem trying to overload a function template, based on
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 bar()
{
foo(B<int>::type());
}
g++ 3.3.1 complains at the above code with the following message:
no matching function for call to `foo(A<int>)'
Similar code works with no problem in VC6.
Am I missing something?
Thanks in advance,
Arkadiy