I am having problems compiling with the following code:
template <typename T,
template <class T, class Allocator = std::allocator<T> > class C>
bool is_in(const C<T>& a, const C<T>& b);
template <typename T, std::vector>
bool is_in(const std::vector<T>& a, const std::vector<T>& b)
{
return false;
}
...
vector<int> a, b;
cout << is_in(a,b) << endl;
Error message (in the line with the inscription "HERE"):
error: 'std::vector' is not a type
(of course, I included the vector from std!). Any suggestion? I worked a bit with it, but I guess I can use some help :-) I need to partially specialize the declaration of the original template so that I can implement compiler switch implementations depending on the actual type of container C (for sets there will be is_in, one for vectors, one for ranges ... with different algorithms every time).
Thank!
Frank source
share