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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [template/] [memfriend6.C] - Blame information for rev 308

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

Line No. Rev Author Line
1 301 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|with" }
12
  void h();                             // { dg-error "candidate|with" }
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|cannot be overloaded" }
21
  template  friend int A::h();  // { dg-error "not match|cannot be overloaded" }
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.