std::unique_ptr<T,Deleter>::operatorbool (3) - Linux Manuals
std::unique_ptr<T,Deleter>::operatorbool: std::unique_ptr<T,Deleter>::operatorbool
NAME
std::unique_ptr<T,Deleter>::operatorbool - std::unique_ptr<T,Deleter>::operatorbool
Synopsis
explicit operator bool() const noexcept; (since C++11)
Checks whether *this owns an object, i.e. whether get() != nullptr.
Parameters
(none)
Return value
true if *this owns an object, false otherwise.
Example
// Run this code
Output:
See also
get (public member function)