cppannotations/yo/stl/uniqueplain.yo
Frank B. Brokken b182a23bd2 WIP
git-svn-id: https://cppannotations.svn.sourceforge.net/svnroot/cppannotations/trunk@357 f6dd340e-d3f9-0310-b409-bdd246841980
2009-12-27 13:53:38 +00:00

15 lines
612 B
Text

tt(Unique_ptr)'s default constructor defines a hi(unique_ptr: default)
tt(unique_ptr) not pointing to a particular block of memory:
verb(
unique_ptr<type> identifier;
)
The hi(unique_ptr: 0-pointer) pointer controlled by the tt(unique_ptr)
object is initialized to tt(0) (zero). Although the tt(unique_ptr) object
itself is not the pointer, its value em(can) be compared to tt(0). Example:
verb(
unique_ptr<int> ip;
if (!ip)
cout << "0-pointer with a unique_ptr object\n";
)
Alternatively, the member ti(get) can be used (cf. section ref(UNIQUMEM)).