M
Misiu
Hello,
How to write partial specialization for my template class (see code
bellow) for std::vector<T>::iterator?
Regards,
Misiu
template <typename T>
struct test
{ static const bool value = false; };
template <typename T>
// For vector itself is OK
struct test<std::vector<T> >
//but not for its iterator: expected a type, got ‘std::vector::iterator’
struct test<std::vector<T>::iterator >
{ static const bool value = true; };
How to write partial specialization for my template class (see code
bellow) for std::vector<T>::iterator?
Regards,
Misiu
template <typename T>
struct test
{ static const bool value = false; };
template <typename T>
// For vector itself is OK
struct test<std::vector<T> >
//but not for its iterator: expected a type, got ‘std::vector::iterator’
struct test<std::vector<T>::iterator >
{ static const bool value = true; };