PR c++/52869
[official-gcc.git] / gcc / testsuite / g++.dg / DRs / dr1207-1.C
blob16fce84427cf10a4c33337c3b68a575804095409
1 // DR 1207
2 // PR c++/52869
3 // { dg-do compile { target c++11 } }
5 struct S {
6     void f() { }
7     void g() noexcept(noexcept(f())) { }
8     void h() noexcept(noexcept(this->f())) { }
9 };
11 struct Nyan {
12         Nyan &operator++() noexcept { return *this; }
13         void omg() noexcept(noexcept(++*this)) {}
16 template <class T>
17 class Test{
18     T count;
19     Test (T arg) {count=arg;}
20     void fetch() { }
21     T inc () noexcept(noexcept(this->fetch())) {return ++count;}
22     T dec () noexcept(noexcept(fetch())) { return --count;}