[ create a new paste ] login | about

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

C++, pasted on Aug 12:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
template <class T, class U> class C {
 public:
  void g() {}
};

class F {};

template <class U> class C<F, U> {
};

void f() {
  C<int, int> c1;
  C<F, int> c2;

  c1.g();
  c2.g();
}


Output:
1
2
3
In function 'void f()':
Line 16: error: 'class C<F, int>' has no member named 'g'
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: