#include <vector>
#include <iostream>
#include <string>
using namespace std;
#include <vector>
#include <iostream>
#include <string>
using namespace std;
// Template-template argument must
// be a class; cannot use typename:
template<typename T, template<typename> class C>
void print2(C<T>& c) {
  copy(c.begin(), c.end(),
       ostream_iterator<T>(cout, " "));
  cout << endl;
}
int main() {
  vector<string> v(5, "Yow!");
  print2(v);
} ///:~
This code looks perfect right to me. But this snippet can't compile in My Mac. The error information is the following
 note: candidate template ignored: substitution failure [with T = std::__1::basic_string<char>]: template template argument has
      different template parameters than its corresponding template template parameter
   void print2(C<T>& c) {
         ^
    1 error generated.
 
    