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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [alias-decl-0.C] - Blame information for rev 715

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-options "-std=c++0x" }
2
 
3
template class TT> struct X { };
4
template struct Y { };
5
template using Z = Y;
6
 
7
void f(X);
8
void g(X);
9
 
10
void
11
foo()
12
{
13
    // Below x and y don't have the same type, because Y and Z don't
14
    // designate the same template ...
15
    X y;
16
    X z;
17
 
18
    // ... So these must fail to compile.
19
    f(z);   // { dg-error "" }
20
    g(y);   // { dg-error "" }
21
}
22
 
23
template struct A0 {};
24
template using AA0 = A0;
25
template using AAA0 = AA0;
26
 
27
void f0(A0);
28
void
29
g0()
30
{
31
  AA0 a;
32
  AAA0 b;
33
  f0(a);
34
  f0(b);
35
}
36
 
37
 

powered by: WebSVN 2.1.0

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