aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/noexcept20.C
blob: ec4f3a153354eeec975de4c833e6c32ffc2d78d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// PR c++/56071
// { dg-do compile { target c++11 } }

class B
{
  template <typename T> friend struct A;
  B() {}
};

template <typename T>
struct A
{
  A() noexcept(noexcept(B())) { }
};

struct C
{
  C()
  {
    static_assert( !noexcept(A<int>()), "" );
  }
};