May 2017
Intermediate to advanced
590 pages
17h 18m
English
The following is a list of typical operations you need to be aware of for working with unique_ptr:
std::unique_ptr<int> pnull; std::unique_ptr<int> pi(new int(42)); std::unique_ptr<int[]> pa(new int[3]{ 1,2,3 }); std::unique_ptr<foo> pf(new foo(42, 42.0, "42"));
std::unique_ptr<int> pi = std::make_unique<int>(42); std::unique_ptr<int[]> pa = std::make_unique<int[]>(3); std::unique_ptr<foo> pf = std::make_unique<foo>(42, ...Read now
Unlock full access