That's doubtlessly the correct explination of what is happening,
but it's not guaranteed. According to the standard: "It is
unspecified whether subobjects representing virtual base classes
are assigned more than once by the implicitly-defined copy
assignment operator."

In practice, of course, most of the time, the virtual base will
be abstract, and not contain any data members, so it won't
matter. Most of the time.

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!