[Bug c++/52869] [DR 1207] "this" not being allowed in noexcept clauses
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Dec 5 20:49:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52869
--- Comment #12 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The exception specification seems to be processed too early, before the other
class members are in scope. This slight variation of comment 5 still fails on
trunk:
struct S {
void g() noexcept(noexcept(f())) { }
void h() noexcept(noexcept(this->f())) { }
void f() { }
};
2869.cc:2:32: error: 'f' was not declared in this scope
2 | void g() noexcept(noexcept(f())) { }
| ^
52869.cc:3:38: error: 'struct S' has no member named 'f'
3 | void h() noexcept(noexcept(this->f())) { }
| ^
More information about the Gcc-bugs
mailing list