var=3;// expected-warning {{use of undeclared identifier 'var'; unqualified lookup into dependent bases of class template 'B' is a Microsoft extension}}
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}}
m_hWnd=1;// expected-warning {{use of undeclared identifier 'm_hWnd'; unqualified lookup into dependent bases of class template 'A' is a Microsoft extension}}
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}}
NameFromBasem;// expected-error {{member 'NameFromBase' found in multiple base classes of different types}} expected-warning {{use of identifier 'NameFromBase' found via unqualified lookup into dependent bases of class templates is a Microsoft extension}}
structC:B<T>{NameFromBasem;};// expected-warning {{use of identifier 'NameFromBase' found via unqualified lookup into dependent bases of class templates is a Microsoft extension}}
}
namespacetype_in_second_dependent_base{
template<typenameT>
structA{};
template<typenameT>
structB{typedefTNameFromBase;};
template<typenameT>
structD:A<T>,B<T>{NameFromBasem;};// expected-warning {{use of identifier 'NameFromBase' found via unqualified lookup into dependent bases of class templates is a Microsoft extension}}
}
namespacetype_in_second_non_dependent_base{
structA{};
structB{typedefintNameFromBase;};
template<typenameT>
structC:A,B{};
template<typenameT>
structD:C<T>{NameFromBasem;};// expected-warning {{use of identifier 'NameFromBase' found via unqualified lookup into dependent bases of class templates is a Microsoft extension}}
}
namespacetype_in_virtual_base_of_dependent_base{
template<typenameT>
structA{typedefTNameFromBase;};
template<typenameT>
structB:virtualA<T>{};
template<typenameT>
structC:B<T>,virtualA<T>{NameFromBasem;};// expected-warning {{use of identifier 'NameFromBase' found via unqualified lookup into dependent bases of class templates is a Microsoft extension}}
structC:B<T>,publicA<T>{NameFromBasem;};// expected-warning {{use of identifier 'NameFromBase' found via unqualified lookup into dependent bases of class templates is a Microsoft extension}} expected-warning {{direct base 'A<int>' is inaccessible due to ambiguity:}}
C<int>c;// expected-note {{in instantiation of template class 'type_in_base_of_multiple_dependent_bases::C<int>' requested here}}
NameFromBasem;// expected-warning {{use of identifier 'NameFromBase' found via unqualified lookup into dependent bases of class templates is a Microsoft extension}}
};
structE:C{
NameFromBasem;// expected-warning {{use of identifier 'NameFromBase' found via unqualified lookup into dependent bases of class templates is a Microsoft extension}}
};
};
template<typenameT>structB<T>::C:B{
NameFromBasem;// expected-warning {{use of identifier 'NameFromBase' found via unqualified lookup into dependent bases of class templates is a Microsoft extension}}
};
template<typenameT>structF:B<T>::C{
NameFromBasem;// expected-error {{unknown type name 'NameFromBase'}}
template<typenameT>decltype(g(T()))check();// expected-note{{candidate template ignored: substitution failure [with T = int]: use of undeclared identifier 'g'}}
decltype(check<int>())x;// expected-error{{no matching function for call to 'check'}}
voidh();
template<typenameT>decltype(h(T()))check2();// expected-note{{candidate template ignored: substitution failure [with T = int]: no matching function for call to 'h'}}
decltype(check2<int>())y;// expected-error{{no matching function for call to 'check2'}}