Code:
template<typename T>class foo
{
  T *t;
};

template<template<typename conatinedType>class container,typename containedType>void func(container<containedType>& c)
{
  c.size();
}
int _tmain(int argc, _TCHAR* argv[])
{
  std::vector< foo<int> >v;
  func(v);
	return 0;
}
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
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.

any ideas? thanks.