boost::openmethod::virtual_ptr::operator=

Set a virtual_ptr to nullptr

Synopsis

virtual_ptr&
operator=(std::nullptr_t);

Description

Set both object and v‐table pointers to nullptr.

Example

struct Animal {}; // polymorphism not required struct Dog : Animal {}; // polymorphism not required BOOST_OPENMETHOD_CLASSES(Animal, Dog); initialize();

Dog snoopy; virtual_ptr<Animal> p = final_virtual_ptr(snoopy);

p = nullptr;

BOOST_TEST(p.get() == nullptr); BOOST_TEST(p.vptr() == nullptr); //!

Created with MrDocs