[ create a new paste ] login | about

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

C++, pasted on Oct 23:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#define template template <class T>
#define foo:: foo<T>::

template class foo {
  T& baz();
};

template T& foo::baz() {
}

#undef template
#undef foo::

int main() {
}


Output:
1
2
3
4
Line 11: error: missing whitespace after the macro name
Line 10: error: extra tokens at end of #undef directive
Line 4: error: 'foo' is not a template
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: