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

constexpr bool foo () { return noexcept (true); }
template <typename T>
struct V
{
  void bar (V &) noexcept (foo ()) {}
};
template <typename T>
struct W : public V <int>
{
  void bar (W &x) { V <int>::bar (x); }
};

int
main ()
{
  W <int> a, b;
  a.bar (b);
}