![]() |
![]()
| ![]() |
![]()
NAMEstd::shared_ptr::unique - std::shared_ptr::unique Synopsis bool unique() const noexcept; (deprecated in C++17)
Parameters(none) Return value true if *this is the only shared_ptr instance managing the
current object, false
Notes This function was deprecated in C++17 and removed in C++20
because use_count is only
Example// Run this code
Output: sp1.unique() == true
See also returns the number of shared_ptr objects referring to the same
managed
|