c++ template class; function with arbitrary container type, how to define it?
Okay, simple template question. Say I define my template class something like this: template<typename T> class foo { public: foo(T const& first, T const& second) : first(first), second(second) {} template<typename C> void bar(C& container, T const& baz) { //... } private: T first; T second; } The question is about my bar function... I need it to be able to use a standard container of some sort, which is why I included the template/typename C part, to define that container type. But apparently that's not the right way to do it, since my test class then complains that: error: 'bar' was not