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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [initlist10.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++/38380
2
// { dg-options "-std=gnu++0x" }
3
 
4
namespace std
5
{
6
 struct atomic_bool
7
  {
8
    bool _M_i;
9
 
10
    atomic_bool() = default;
11
    ~atomic_bool() = default;
12
    atomic_bool(const atomic_bool&) = delete;
13
    atomic_bool& operator=(const atomic_bool&) = delete;
14
 
15
    explicit atomic_bool(bool __i) { _M_i = __i; }
16
 
17
    operator bool() const volatile
18
    { return true; }
19
  };
20
}
21
 
22
namespace __gnu_test
23
{
24
  struct direct_list_initializable
25
  {
26
    template
27
      void
28
      operator()()
29
      {
30
        struct _Concept
31
        {
32
          void __constraint()
33
          {
34
            _Ttype __v1 = { }; // default ctor
35
            _Ttype __v2 { __a };  // single-argument ctor
36
          }
37
 
38
          _Tvalue __a;
39
        };
40
 
41
        void (_Concept::*__x)() __attribute__((unused))
42
          = &_Concept::__constraint;
43
      }
44
  };
45
}
46
 
47
int main()
48
{
49
  __gnu_test::direct_list_initializable test;
50
 
51
  test.operator()();
52
  return 0;
53
}

powered by: WebSVN 2.1.0

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