language: C++11 (gcc-4.7.2)
date: 646 days 10 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <utility>
 
struct A
{
  struct Gold {};
};
 
struct B : public A
{
  typedef Gold BaseGold;
  struct Gold {};
};
 
struct C : public B
{
  typedef Gold BaseGold;
  struct Gold {};
};
 
static_assert(std::is_same<B::BaseGold, A::Gold>::value, "Not the right treasure!");
static_assert(std::is_same<C::BaseGold, B::Gold>::value, "Not the right treasure!");
 
/usr/lib/gcc/i686-pc-linux-gnu/4.5.1/../../../crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status