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.