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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [initlist9.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
// PR c++/37860
2
// { dg-options "-std=c++0x" }
3
 
4
struct b
5
{
6
  bool t;
7
 
8
  b() = default;
9
  ~b() = default;
10
  b& operator=(const b&) = delete;
11
  b(const b&) = delete;            // { dg-error "declared" }
12
 
13
  b(bool _t): t (_t) { }
14
};
15
 
16
int main()
17
{
18
  // copy list initialization
19
  b tst1 = { false };
20
 
21
  // copy initialization.
22
  b tst2 = false;               // { dg-error "use" }
23
 
24
  // direct list initialization
25
  b tst3 { false };
26
 
27
  // default initialization
28
  b tst4;
29
}

powered by: WebSVN 2.1.0

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