- memory[meta header]
- std[meta namespace]
- unique_ptr[meta class]
- function[meta id-type]
- cpp11[meta cpp]
pointer operator->() const noexcept;ポインタを通してオブジェクトにアクセスする。
get() != nullptr- get()[link get.md]
#include <iostream>
#include <memory>
#include <string>
int main()
{
std::unique_ptr<std::string> p(new std::string("hello"));
std::cout << p->c_str() << std::endl;
}hello
- C++11
- GCC: 4.4.7
- Clang libc++, C++11 mode: 3.0
- ICC: ?
- Visual C++: 2010, 2012, 2013