Boost logo

Boost :

From: John Maddock (John_Maddock_at_[hidden])
Date: 2001-03-04 06:22:51


Dave,

>It seems to me that the compiler is probably in error here, but all the
>same, I'm curious as to why we're not using IntType as one of the
>parameters, rather than using a free T parameter. Can somebody fill me in?

I'm not sure if this is the problem here or no, but often I've had to make
sure that partially overloaded functions take the same parameter "kind", in
order to ensure that overloading is correctly resolved:

so:

template <class T>
void foo(T t);
template <class T>
void foo( const A<T>&);

Doesn't work, but changing this to:

template <class T>
void foo(const T& t);
template <class T>
void foo( const A<T>&);

and everything is fine.

- John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk