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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.dg/] [template/] [friend35.C] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
// { dg-do compile }
2
 
3
// Origin: Giovanni Bajo 
4
 
5
// PR c++/4403: Incorrect friend class chosen during instantiation.
6
 
7
template 
8
struct A
9
{
10
  struct F;
11
};
12
 
13
template 
14
struct B : A
15
{
16
  friend struct F;
17
private:
18
  int priv;
19
};
20
 
21
struct F
22
{
23
  void func(void)
24
  {
25
    B b;
26
    b.priv = 0;
27
  }
28
};

powered by: WebSVN 2.1.0

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