cppannotations/annotations/yo/stl/sharedplain.yo
Frank B. Brokken 777b182edd Moved all files but 'excluded', 'sf', and 'sourcetar' to ./annotations
This allowed me to standardize the sourcetar and sf/* scripts: the base
    directory (containing ./git) is now empty, except for maintenance scripts,
    while the source files and build scripts of the annotations are stored in
    a subdirectory of their own.
2013-05-29 20:44:08 +02:00

15 lines
612 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)).