OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [template/] [memfriend6.C] - Blame information for rev 154

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do compile }
2
 
3
// Copyright (C) 2003 Free Software Foundation
4
// Contributed by Kriang Lerdsuwanakij 
5
 
6
// Member function of class template as friend
7
// Erroneous case: mismatch during declaration
8
 
9
template  struct A {
10
  template  void f(U);          // { dg-error "candidate" }
11
  void g();                             // { dg-error "candidate" }
12
  void h();                             // { dg-error "candidate" }
13
  void i(int);                          // { dg-error "candidate" }
14
};
15
 
16
class C {
17
  int ii;
18
  template  friend void A::f(U);        // { dg-error "not match" }
19
  template  template 
20
    friend void A::g();                 // { dg-error "not match" }
21
  template  friend int A::h();  // { dg-error "not match" }
22
  template  friend void A::i(char);     // { dg-error "not match" }
23
};

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.