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

            Bug ID: 79670
           Summary: [c++1z] cannot call member function without object in
                    noexcept declarator of a member function
           Product: gcc
           Version: 7.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: benni.buch at gmail dot com
  Target Milestone: ---

struct A{
        void get(){}
        void f()noexcept(noexcept(get())){}
};

int main(){}


Should be a valid program, but:


$ g++ -std=c++1z -o noexcept noexcept.cpp 
noexcept.cpp:3:32: error: cannot call member function 'void A::get()' without
object
  void f()noexcept(noexcept(get())){}

Reply via email to