This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115a. See for the official list.


1281. Virtual and dependent base classes

Section:  [temp.dep.type]     Status: NAD     Submitter: Johannes Schaub     Date: 2011-03-28

Consider the following example:

  struct A {
   virtual void f() { /* base */ }

  struct B : virtual A {
   virtual void f() { /* derived */ }

  template<typename T>
  struct C : virtual A, T {
   void g() {

  int main() {
   C<B> c;

This is reasonable C++03 code that is invalidated by the resolution of issue 1043. In the presence of virtual non-dependent base classes and other dependent base classes, one cannot rely on something being found for real when doing the lookup in the instantiation context (therefore, one cannot know whether a "typename" is actually valid or not, without knowing all dependent base classes).

Rationale (August, 2011):

This example is not sufficient motivation to revisit the outcome of issue 1043. ((T*)this)->f() can be used to allow lookup in a dependent base.