Slajd PPT
Argumentem wzorca, obok nazwy typu, mogą być
template<class T, int rozm> class bufor{
T w[rozm]; // w czasie kompilacji znany jest
// rozm więc można przydzielić pamięć dla bufora
buf1=buf2; //źle - niezgodność typów
Każdy argument wzorca funkcji musi wpływać na typ co najmniej jednego argumentu wzorca funkcji
template<class T> void f1(T); //OK
template<class T> T f2(int); // źle
template<class T, class C> void f3(T); //źle