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

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 class Meta, int Initial, int... Values>
3
struct accumulate {
4
  static const int value = Initial;
5
};
6
 
7
template class Meta, int Initial, int Value, int... Rest>
8
struct accumulate {
9
  static const int value =
10
    Meta::value>::value;
11
};
12
 
13
template
14
struct sum {
15
  static const int value = X + Y;
16
};
17
 
18
template
19
struct prod {
20
  static const int value = X * Y;
21
};
22
 
23
int a0[accumulate::value == 15? 1 : -1];
24
int a1[accumulate::value == 120? 1 : -1];

powered by: WebSVN 2.1.0

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