[Bug c++/53360] g++ prints 'invalid use of incomplete type' error when compiling code with -std=gnu++0x and newer

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Aug 20 19:30:00 GMT 2017


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

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
If we add this to expression it compiles OK:

    expression& operator=(const expression&) { return *this; }

So the invalid instantiation of column::operator=<column>(const column&) comes
from the compiler-generated copy assignment operator. That presumably gets
defined during overload resolution.

I don't know what the difference is between C++98 and C++11 that causes that
(or if it's reasonable to expect a c++11-compat warning).


More information about the Gcc-bugs mailing list