[ create a new paste ] login | about

Link: http://codepad.org/fVqezGxm    [ raw code | output | fork ]

C++, pasted on Jan 17:
1
2
3
4
5
6
7
struct Base;
struct Derived;

struct T {
   T(Derived& d) : lol(static_cast<Base>(d)) {};
   Base& lol;
};


Output:
1
2
3
t.cpp: In constructor 'T::T(Derived&)':
Line 5: error: invalid use of undefined type 'struct Base'
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: