http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52755
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org --- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-03-29 13:31:00 UTC --- (In reply to comment #3) > But that is not the question. The question is if that is a gcc bug or > not. If C++11 is really different compared to C++98 here (I'm not sure It's certainly different because there are no deleted functions in C++98, but I'm not sure if the code is valid in C++98 or not, G++ and EDG accept it but clang++ doesn't. As far as I can see C++98 should have the same behaviour, assigning t2 requires assigning a volatile t1, which can't use the implicitly-declared assignment operator. Maybe Jason can clarify. > about that), then I would prefer _one_ clear error message like > "error: C++11 does not allow ..." or "error: C++11 demands ..." or > similar, and not that weird 3 error messages plus 5 notes about > implicitly deleted simple assignments operators. That's not possible in general, and I actually prefer the explanation of which rules caused the error. What do you suggest it prints? There's no easy answer. Attempting to turn that into natural language would go wrong too often and give misleading errors. The problem is that you tried to use the implicit assignment operator, which is deleted, so the compiler tells you why it's deleted. The message is great IMHO, a huge improvement on the diagnostics given by older versions of GCC.