15 this->get_vtable().destroy(this->mStorage);
20 other.get_vtable().move_to(other.mStorage, this->mStorage);
21 this->mStorage.vfptr = std::exchange(other.mStorage.vfptr,
nullptr);
23 this->construct_empty();
27 if (
this != std::addressof(other)) {
29 this->get_vtable().destroy(this->mStorage);
32 other.get_vtable().move_to(other.mStorage, this->mStorage);
33 this->mStorage.vfptr = std::exchange(other.mStorage.vfptr,
nullptr);
35 this->construct_empty();
44 this->get_vtable().destroy(this->mStorage);
45 this->mStorage.vfptr =
nullptr;
50 [[nodiscard]]
friend bool operator==(
function_base const& self, nullptr_t)
noexcept {
51 return !
static_cast<bool>(self);
64 other.get_vtable().copy_to(other.mStorage, this->mStorage);
65 this->mStorage.vfptr = other.mStorage.vfptr;
67 this->construct_empty();
71 if (
this != std::addressof(other)) {
73 this->get_vtable().destroy(this->mStorage);
76 other.get_vtable().copy_to(other.mStorage, this->mStorage);
77 this->mStorage.vfptr = other.mStorage.vfptr;
79 this->construct_empty();