2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / template / instantiate5.C
blob8d07635629490c9fecd1adf1432a980571f45640
1 // { dg-do compile }
3 // Origin: Volker Reichelt <reichelt@gcc.gnu.org>
5 // PR c++/11616: Incorrect line number in diagnostics
7 template <int> struct A
9   static const int i=0;
12 int baz() { return A<0>::i; }
14 struct B
16   static void foo (int);        // { dg-error "candidates" }
19 template <typename T> struct C
21   virtual void bar() const { T::foo(); } // { dg-error "no matching function" }
24 C<B> c;                         // { dg-error "instantiated" }