language: C++ 4.7.2 (gcc-4.7.2)
date: 616 days 5 hours ago
link:
visibility: private
1
2
3
4
5
6
7
8
9
10
11
#include <iostream>
 
struct Base { Base() { std::cout << "Base(): " << this << "\n"; } };
struct DerivedBaseOne : public Base { DerivedBaseOne() { std::cout << "DerivedBaseOne(): " << this << "\n"; } };
struct DerivedBaseTwo : public Base { DerivedBaseTwo() { std::cout << "DerivedBaseTwo(): " << this << "\n"; } };
struct Derived : public DerivedBaseTwo, public DerivedBaseOne { Derived() { std::cout << "Derived(): " << this << "\n"; } };
 
int main() {
  Derived d;
}