Smart References

Definition
Library Templates
shared_obj
unique_obj

Definition

Smart references, like Smart Interface Pointers, are class templates parameterized by an interface whose instances are capable of managing any object whose type implements the interface. They differ from smart pointers in two ways

Library Templates

Boost.Interfaces includes two smart reference templates: unique_obj and shared_obj.

shared_obj

The class template shared_obj is a reference-counted smart reference template patterned on the template boost::shared_ptr.

unique_obj

The class template unique_obj is a smart reference template patterned on the template move_ptr introduced in [Hinnant1] as a safe replacement for std::auto_ptr. It has the following characteristics:

Ownership may be transfered from an lvalue of type unique_obj using the function template move.


Sha'arei Tefila, an Orthodox Shul (Synagogue) in Salt Lake City, Utah Chabad Lubavitch of Utah