Jeffrey Holle <jeff.holle@xxxxxxxxxxx> writes: > Which is the preferred syntax? > Are these equivalent? In this context, 'typename' and 'class' are equivalent. > Can anything else besides "typename" or "class" be used? There are template template parameters (14.3.3): template<class t> struct foo{}; template<template<class t>class f> struct bar { f<int> g; }; int main() { bar<foo> b; } template non-type parameters (14.3.2), which can be integral types, pointer types, reference types, or pointer to member types: #include<iostream> template<int size> struct use_int { char a[size]; }; template<void(*f)()> struct use_f { void call_f(){f();} }; template<char** message,std::ostream& os> struct use_ptr { std::ostream& print() { return os << *message; } }; void g() { std::cout << "Called g()." << std::endl; } char* cp= "some message"; int main() { use_int<10> a; use_f<g> b; b.call_f(); use_ptr< &cp, std::cout > c; c.print(); std::cout << std::endl; }