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/] [friend.C] - Blame information for rev 825

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

Line No. Rev Author Line
1 149 jeremybenn
// Contribued by Gabriel Dos Reis 
2
// Origin: iskey@i100.ryd.student.liu.se
3
 
4
class ostream;
5
extern ostream& cout;
6
 
7
template  struct s;
8
 
9
template 
10
ostream& operator<<(ostream &o, const typename s::t &x)
11
{
12
  return o;
13
}
14
 
15
template 
16
struct s {
17
  struct t
18
  {
19
    friend ostream&
20
    operator<<(ostream&, const typename s::t &);
21
  };
22
  t x;
23
};
24
 
25
int main()
26
{
27
  s::t y;
28
  cout << y; // { dg-error "" }
29
}

powered by: WebSVN 2.1.0

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