2010-05-21 60 views

回答

4

你需要一个template template parameter

template < template <typename> class Container> void foo (Container<string>& stuff); 
+0

'模板类Container'。 – kennytm 2010-05-21 17:58:04

+0

是的,第二个类型名称需要类,而它的工作原理。谢谢! – Kyle 2010-05-21 18:07:46

+2

该链接页面的最后一句话是错误的。看到[我的问题](http://stackoverflow.com/questions/1469743/standard-library-containers-with-additional-optional-template-parameters) – 2010-05-21 18:09:09