summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/defaulted23.C
blob: 5b4438ddd02029555d4b8450f5fde1eb24f0fd2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Test for checking of exception specifications on defaulted fns
// { dg-options -std=c++0x }

struct A
{
  A() noexcept = default;
};

struct B
{
  B() throw (int) = default; // { dg-error "exception-specification that differs from the implicit declaration" }
};

struct C
{
  C() throw (int) { }
};

struct D: C
{
  D() throw (int) = default;
};

struct E
{
  E() = default;
};