[Bug c++/52869] [DR 1207] "this" not being allowed in noexcept clauses

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Dec 12 22:49:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52869

--- Comment #17 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(In reply to denin from comment #16)
> (In reply to Marek Polacek from comment #14)
> > This is actually another problem, one that is tracked in PR86476.
> 
> Hmm.
> 
> $ cat wat.cpp 
> struct Omg {
> 	void f() {}
> 	void g() noexcept(noexcept(f())) {}
> };
> $ g++ wat.cpp 
> wat.cpp:3:31: error: cannot call member function ‘void Omg::f()’ without
> object
>   void g() noexcept(noexcept(f())) {}
>                                ^
> $ g++ -v |& grep version
> gcc version 8.2.1 20181127 (GCC)

This is what the commit in Comment 10 fixed; it has only been fixed for GCC 9.


More information about the Gcc-bugs mailing list