class bar {
    void foo(bool a = 3 < 2, bool b = true) {}
};

$ g++ -c ./main.cpp
./main.cpp:2:39: error: redefinition of 'bool b'
./main.cpp:2:39: error: 'bool b' previously declared here


(This happends only if the funciton is a member function)


-- 
           Summary: default argument with '<' cause compilation error
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ogoffart at kde dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44991

Reply via email to