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/] [wrap1.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
// Copyright (C) 2002 Free Software Foundation, Inc.
4
// Contributed by Michael Matz 03 Mar 2002 
5
// instance of an actual pattern in 252.eon from SPEC2000
6
 
7
// The last Wrapper once wasn't completed when applying '='.
8
 
9
template 
10
class Wrapper {
11
  public:
12
    Wrapper (T& a);
13
    Wrapper (const Wrapper& ref);
14
};
15
 
16
template 
17
class Element {
18
public:
19
  T * operator[](int x);
20
};
21
 
22
void test()
23
{
24
  char bla = 42;
25
  Element< Wrapper  > elem;
26
  elem[1][1] = Wrapper (bla);
27
}

powered by: WebSVN 2.1.0

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