Hi all,
I'm having a problem writing template functions that take
vector<T>::iter ator as arguments and I'm sure you guys can set me
straight. Like this:
#include<vector >
using namespace std;
template<typena me T>
void test2(typename std::vector<T>: :iterator b)
{};
void test() {
vector<doublev;
test2(v.begin() );
}
If compiled with g++, I get
junk.cc:11: error: no matching function for call to
'test2(__gnu_cx x::__normal_ite rator<double*, std::vector<dou ble,
std::allocator< double >)'
If I specialize the test2 function with
void test2(std::vect or<double>::ite rator b)
{};
it compiles fine. I don't understand why it's not picking up the
templated version.
Regards,
/Patrik