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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 693 jeremybenn
// DR 990
2
// { dg-options "-std=c++0x" }
3
 
4
#include 
5
 
6
struct S {
7
  S(std::initializer_list);  // #1
8
  S(std::initializer_list);     // #2
9
  S();                                     // #3
10
  // ...
11
};
12
S s1 = { 1.0, 2.0, 3.0 };            // invoke #1
13
S s2 = { 1, 2, 3 };                  // invoke #2
14
S s3 = { };                          // invoke #3 (for value-initialization)
15
 
16
 
17
// Test some other situations, too.
18
void f (S);
19
int main()
20
{
21
  S s4 { };
22
  f({ });
23
  S {};
24
}

powered by: WebSVN 2.1.0

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