mirror of
https://gitlab.com/fbb-git/cppannotations
synced 2024-11-18 10:06:54 +01:00
1a79a29b78
git-svn-id: https://cppannotations.svn.sourceforge.net/svnroot/cppannotations/trunk@361 f6dd340e-d3f9-0310-b409-bdd246841980
15 lines
613 B
Text
15 lines
613 B
Text
tt(Shared_ptr)'s default constructor defines a hi(shared_ptr: default)
|
|
tt(shared_ptr) not pointing to a particular block of memory:
|
|
verb(
|
|
shared_ptr<type> identifier;
|
|
)
|
|
The hi(shared_ptr: 0-pointer) pointer controlled by the tt(shared_ptr)
|
|
object is initialized to tt(0) (zero). Although the tt(shared_ptr) object
|
|
itself is not the pointer, its value em(can) be compared to tt(0). Example:
|
|
verb(
|
|
shared_ptr<int> ip;
|
|
|
|
if (!ip)
|
|
cout << "0-pointer with a shared_ptr object\n";
|
|
)
|
|
Alternatively, the member ti(get) can be used (cf. section ref(SHAREDMEM)).
|