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() ; }
Fixed by the patch for 49066. *** This bug has been marked as a duplicate of bug 49066 ***