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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [constexpr-value2.C] - Blame information for rev 707

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
4
constexpr T value_init() { return T(); }
5
 
6
template
7
constexpr inline T bar(T x) { return x; }
8
 
9
union EmptyUnion {};
10
union Union1 { int i; };
11
union Union3 { double d; int i; char* c; };
12
 
13
constexpr auto u1 = value_init();
14
constexpr auto u2 = value_init();
15
constexpr auto u3 = value_init();
16
constexpr auto u4 = bar(EmptyUnion{});
17
constexpr auto u5 = bar(Union1{});
18
constexpr auto u6 = bar(Union3{});
19
constexpr auto u7 = bar(u1);

powered by: WebSVN 2.1.0

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