[Bug c++/92907] noexcept does not consider "const" in member functions

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jan 21 21:03:00 GMT 2020


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

--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I think I see the problem -- in cp_parser_noexcept_specification_opt we inject
'this', but always without any qualifiers:
25737           if (current_class_type)
25738             inject_this_parameter (current_class_type, TYPE_UNQUALIFIED);
so I think we need to pass the constness of the function here, then this ought
to work as expected.


More information about the Gcc-bugs mailing list