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

            Bug ID: 92907
           Summary: noexcept does not consider "const" in member functions
           Product: gcc
           Version: 9.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: HZ2012 at gmx dot at
  Target Milestone: ---

Created attachment 47470
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47470&action=edit
Source code example

When the noexcept operator is used in the context of a const member function,
const is not considered for the member variables

i.e. the enclosed expample prints for gcc 9.1.0

  noexcept(ca.g())=false

but should print

  noexcept(ca.g())=true

(as is done by clang 8.0.1)

In addition, member variables are not found when they are declared after the
noexcept operator.

Reply via email to