view gcc/testsuite/g++.dg/cpp0x/noexcept22.C @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 04ced10e8804
children
line wrap: on
line source

// 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);
}