##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::experimental::shared_ptr::operator*, std::experimental::shared_ptr::operator->

From cppreference.com
< cpp‎ | experimental‎ | shared ptr

T& operator*() const; | (1) | (library fundamentals TS)
T* operator->() const; | (2) | (library fundamentals TS)

Dereferences the stored pointer. The behavior is undefined if the stored pointer is null.

### [edit] Parameters

(none)

### [edit] Return value

1) The result of dereferencing the stored pointer, i.e., *get()
2) The stored pointer, i.e., get()

### [edit] Exceptions

`noexcept` specification:
noexcept

### [edit] Remarks

When `T` is an array type or (possibly cv-qualified) `void`, it is unspecified whether function (1) is declared.

When `T` is an array type, it is unspecified whether function (2) is declared.

In either case, if the function is declared, it is unspecified what its return type is, except that the declaration (although not necessarily the definition) of the function is guaranteed to be legal.

### [edit] Example

| This section is incomplete Reason: no example

### [edit] See also

get | returns the stored pointer (public member function) [edit]

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/experimental/shared_ptr/operator*&oldid=91827"
Categories:

- unconditionally noexcept
- Todo no example

Hidden categories:

- Pages with unreviewed unconditional noexcept template
- Pages with unreviewed noexcept template