simple template class inheritance

template<class Z>
class A1{
protected :
Z u;

public:
A1(Z pu):u(pu){}
Z getU(){return u;}

};


template <class Z>
class A2:public A1<Z>{

public:
A2(Z pu):A1<Z>(pu){};
Z nothing(){return u;}
}

In a normal class u is defined in this scope --in A2--, but in a template is not . as protected shouldn't be visible within A2? what is wrong
Topic archived. No new replies allowed.