templating the container and contained type
template<typename T>class foo
template<template<typename conatinedType>class container,typename containedType>void func(container<containedType>& c)
int _tmain(int argc, _TCHAR* argv)
std::vector< foo<int> >v;
what i'd like to do is make a function that can process different kinds of stl containers, provided that they provide the required API. e.g. i may need to use a vector at some point and a valarray later. this is the attempted implementation that seems to come closest to doing what i want, but it's obviously still failing.
Error 1 error C2039: 'size' : is not a member of 'std::_Container_base_aux_alloc_empty<_Alloc>' c:\users\mfowler\documents\visual studio 2008\projects\test\test\test.cpp 13
any ideas? thanks.