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/] [cpp0x/] [variadic20.C] - Blame information for rev 320

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

Line No. Rev Author Line
1 301 jeremybenn
// { dg-options "-std=gnu++0x" }
2
template struct add_pointer;
3
template struct add_reference;
4
 
5
template class... Metafunctions>
6
struct metatuple {
7
  static const int value = 0;
8
};
9
 
10
template<>
11
struct metatuple {
12
  static const int value = 1;
13
};
14
 
15
template class Meta>
16
struct metatuple { // { dg-error "candidates" }
17
  static const int value = 2;
18
};
19
 
20
template class... Metafunctions>
21
struct metatuple { // { dg-error "" }
22
  static const int value = 3;
23
};
24
 
25
template class First,
26
         template class... Metafunctions>
27
struct metatuple { // { dg-error "struct" }
28
  static const int value = 4;
29
};
30
 
31
template class First,
32
         template class Second,
33
         template class... Metafunctions>
34
struct metatuple { // { dg-error "struct" }
35
  static const int value = 5;
36
};
37
 
38
int a0[metatuple<>::value == 0? 1 : -1];
39
int a1[metatuple::value == 1? 1 : -1];
40
int a2a[metatuple::value == 2? 1 : -1]; // { dg-error "ambiguous" }
41
int a2b[metatuple::value == 2? 1 : -1];
42
int a3[metatuple::value == 3? 1 : -1]; // { dg-error "ambiguous" }
43
int a4[metatuple::value == 4? 1 : -1];
44
int a5[metatuple::value == 5? 1 : -1];
45
 
46
// { dg-error "incomplete" "" { target *-*-* } 40 }
47
// { dg-error "incomplete" "" { target *-*-* } 42 }

powered by: WebSVN 2.1.0

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