staticvoidstatic_func();// expected-note {{must qualify identifier to find this declaration in dependent base class}}
voidfunc();// expected-note {{must qualify identifier to find this declaration in dependent base class}}
};
template<classT>
classB:publicA<T>{
public:
staticvoidz2(){
static_func();// expected-warning {{use of identifier 'static_func' found via unqualified lookup into dependent bases of class templates is a Microsoft extension}}
func();// expected-warning {{use of identifier 'func' found via unqualified lookup into dependent bases of class templates is a Microsoft extension}} expected-error {{call to non-static member function without an object argument}}
staticintf1();// expected-note {{must qualify identifier to find this declaration in dependent base class}}
intf2();// expected-note {{must qualify identifier to find this declaration in dependent base class}}
};
template<classT>
classB:publicA<T>{
public:
voidg1(intp=f1());// expected-warning {{use of identifier 'f1' found via unqualified lookup into dependent bases of class templates is a Microsoft extension}}
voidg2(intp=f2());// expected-warning {{use of identifier 'f2' found via unqualified lookup into dependent bases of class templates is a Microsoft extension}} expected-error {{call to non-static member function without an object argument}}
boolbase_fun(void*p){returnfalse;}// expected-note {{must qualify identifier to find this declaration in dependent base clas}}
operatorT*()const{return0;}
};
template<classT>
classContainer:publicBase<T>{
public:
template<typenameS>
booloperator=(constContainer<S>&rhs){
returnbase_fun(rhs);// expected-warning {{use of identifier 'base_fun' found via unqualified lookup into dependent bases of class templates is a Microsoft extension}}
}
};
voidf(){
Container<A>text_provider;
Container<B>text_provider2;
text_provider2=text_provider;// expected-note {{in instantiation of function template specialization}}