D::foo2();// expected-warning {{use of undeclared identifier 'D'; unqualified lookup into dependent bases of class template 'B' is a Microsoft extension}}
templatestructB<int>;// Instantiation has no warnings.
}
namespacenested_nodep_base{
// There are limits to our hacks, MSVC accepts this, but we don't.
structA{
structD{staticvoidfoo2();};
};
template<typenameT>
structB:T{
structC{
voidfoo(){
D::foo2();// expected-error {{use of undeclared identifier 'D'}}
}
};
};
templatestructB<A>;// Instantiation has no warnings.
}
namespacenested_dep_base{
// We actually accept this because the inner class has a dependent base even
// though it isn't a template.
structA{
structD{staticvoidfoo2();};
};
template<typenameT>
structB{
structC:T{
voidfoo(){
D::foo2();// expected-warning {{use of undeclared identifier 'D'; unqualified lookup into dependent bases of class template 'C' is a Microsoft extension}}
}
};
};
templatestructB<A>;// Instantiation has no warnings.