Debian Codegraph @

gcc/testsuite/g++.dg/DRs/dr1207-1.C

raw
1 // DR 1207
2 // PR c++/52869
3 // { dg-do compile { target c++11 } }
4
5 struct S {
6 void f() { }
7 void g() noexcept(noexcept(f())) { }
8 void h() noexcept(noexcept(this->f())) { }
9 };
10
11 struct Nyan {
12 Nyan &operator++() noexcept { return *this; }
13 void omg() noexcept(noexcept(++*this)) {}
14 };
15
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;}
23 };