Return whether this managed pointer is non‐empty.
Synopsis
Declared in <bslma_managedptr.h>
operator BoolType() const;
Description
Return a value of "unspecified bool" type that evaluates to false if this managed pointer is empty, and true otherwise. Note that this conversion operator allows a managed pointer to be used within a conditional context, such as within an if or while statement, but does not allow managed pointers to be compared (e.g., via < or >). Also note that a superior solution is available in C++11 using the explicit operator bool() syntax, that removes the need for a special boolean‐like type and private equality‐comparison operators.
Return Value
value that evaluates to false if empty, and true otherwise
Created with MrDocs