std::reverse_iterator::operator*,-> - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::reverse_iterator::operator*,->

From cppreference.com
< cpp‎ | iterator‎ | reverse iterator

reference operator*() const; | (1) |
pointer operator->() const; | (2) |

Returns a reference or pointer to the element previous to `current`.

1) Equivalent to Iterator tmp = current; return *--tmp;
2) Equivalent to std::addressof(operator*()).

### [edit] Parameters

(none)

### [edit] Return value

Reference or pointer to the element previous to `current`.

### [edit] Notes

Prior to the introduction of multithreading in C++11, implementations of `reverse_iterator` commonly stored a decremented copy of `current` as a member, see defect 2360.

### [edit] Example

| This section is incomplete Reason: no example

### [edit] See also

operator[] | accesses an element by index (public member function) [edit]

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/iterator/reverse_iterator/operator*&oldid=68841"
Category:

- Todo no example