Yeeun
0
Q:

templates of templates c++

template <typename T>
void Swap(T &n1, T &n2)
{
	T temp;
	temp = n1;
	n1 = n2;
	n2 = temp;
}
0
// template function
template <class T>
T Large(T n1, T n2)
{
	return (n1 > n2) ? n1 : n2;
}
0
namespace std {
  template<typename t> struct hash<MyClass<t>>
  {
  	size_t operator() (const MyClass<t>& c) const;
  }
}

// You can also do things like

template<template<typename t> class type> func_name<type<t>>();
0

New to Communities?

Join the community