I think re-declare a deleted function is well-formed.

void f() = delete ; // shall be the first declaration of the function
void f() ; // re-declare a previous deleted function.

But doing so makes gcc does not issue correct compile errors on following code.

void f() = delete ;
void f() ; // if I comment out this line. gcc issues correct errors.

int main()
    // should be error: use of deleted function 'void f()'
    // gcc does not issue error for this.
    typedef decltype(f) type ;

    // gcc issues error for this.
    // However, error message was: undefined reference to `f()'
    // correct error should be: use of deleted function 'void f()'
    f() ;

           Summary: Redeclare a deleted funciton makes gcc does not issue
                    compile error
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: boostcpp at gmail dot com


Reply via email to