[Bug c++/60318] Documentation bug: C++ Misunderstandings: Implicit Copy-Assignment for Virtual Bases
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Sep 8 23:31:59 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60318
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:b9f52acb7dc74fb7b4591f98d81cdcf54b36df38
commit r10-10102-gb9f52acb7dc74fb7b4591f98d81cdcf54b36df38
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue Aug 31 09:46:41 2021 +0100
c++: Fix docs on assignment of virtual bases [PR60318]
The description of behaviour is incorrect, the virtual base gets
assigned before entering the bodies of A::operator= and B::operator=,
not after.
The example is also ill-formed (passing a string literal to char*) and
undefined (missing return from Base::operator=).
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
gcc/ChangeLog:
PR c++/60318
* doc/trouble.texi (Copy Assignment): Fix description of
behaviour and fix code in example.
(cherry picked from commit 3c64582372cf445eabc4f9e99def7e33fb0270ee)
More information about the Gcc-bugs
mailing list