bsl::shared_ptr::operator BoolType

Return a value of an "unspecified bool" type that evaluates to false if this shared pointer does not refer to an object, and true otherwise. Note that this conversion operator allows a shared pointer to be used within a conditional context (e.g., within an if or while statement), but does not allow shared pointers to unrelated types to be compared (e.g., via < or >).

Synopsis

Declared in <bslstl_sharedptr.h>

operator BoolType() const noexcept;