File: uniqueplain.yo

package info (click to toggle)
c%2B%2B-annotations 13.02.02-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,576 kB
  • sloc: cpp: 25,297; makefile: 1,523; ansic: 165; sh: 126; perl: 90; fortran: 27
file content (13 lines) | stat: -rw-r--r-- 586 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
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(UNIQUEMEM)).