Namespaces
Variants
Views
Actions

std::shared_ptr::operator bool

From cppreference.com
< cpp‎ | memory‎ | shared ptr
Revision as of 08:58, 6 February 2013 by Cubbi (Talk | contribs)

 
 
 
 
 
explicit operator bool() const;

Checks if *this manages an object, i.e. whether get() != 0.

Contents

Parameters

(none)

Return value

true if *this manages an object, false otherwise.

Exceptions

noexcept specification:  
noexcept
  

Example

See also

Template:cpp/memory/shared ptr/dcl list get