Date: Wed, 30 Apr 2025 18:07:10 +0100
On Wed, 30 Apr 2025 at 18:02, Hans Ã…berg <haberg_1_at_[hidden]> wrote:
>
>
> > On 30 Apr 2025, at 18:58, Jonathan Wakely <cxx_at_[hidden]> wrote:
> >
> >> Anyway, adding a new class alone cannot solve the issue of proper virtual copy and move, as the functions for doing that must be present, and currently they are not part of the vtables unless added by hand.
> >
> > That's not true.
>
> Which part, virtual copy and move, or that they are not on the vtable?
They don't need to be virtual at all.
As I already said elsewhere in the thread, std::polymorphic generates
"clone" functions for you, based on the copy and move constructors.
>
>
> > On 30 Apr 2025, at 18:58, Jonathan Wakely <cxx_at_[hidden]> wrote:
> >
> >> Anyway, adding a new class alone cannot solve the issue of proper virtual copy and move, as the functions for doing that must be present, and currently they are not part of the vtables unless added by hand.
> >
> > That's not true.
>
> Which part, virtual copy and move, or that they are not on the vtable?
They don't need to be virtual at all.
As I already said elsewhere in the thread, std::polymorphic generates
"clone" functions for you, based on the copy and move constructors.
Received on 2025-04-30 17:07:26