How to templatize the container type in a function declaration?
Posted
by Kyle
on Stack Overflow
See other posts from Stack Overflow
or by Kyle
Published on 2010-05-21T17:55:07Z
Indexed on
2010/05/21
18:00 UTC
Read the original article
Hit count: 129
I want to write a function that accepts any container holding strings. Something like this:
template <typename Container> void foo(Container<string>& stuff);
But this isn't the right syntax. What's the right syntax?
© Stack Overflow or respective owner