typename add_lvalue_reference<element_type>::type operator*() const;
123456789101112131415
// unique_ptr::operator* #include <iostream> #include <memory> int main () { std::unique_ptr<int> foo (new int); std::unique_ptr<int> bar (new int (100)); *foo = *bar * 2; std::cout << "foo: " << *foo << '\n'; std::cout << "bar: " << *bar << '\n'; return 0; }
foo: 200 bar: 100