std::move_iterator<Iter>::operator*,-> (3) - Linux Manuals

std::move_iterator<Iter>::operator*,->: std::move_iterator<Iter>::operator*,->

NAME

std::move_iterator<Iter>::operator*,-> - std::move_iterator<Iter>::operator*,->

Synopsis


reference operator* () const; (until C++17)
constexpr reference operator* () const; (since C++17)
pointer operator->() const; (1) (until C++17)
constexpr pointer operator->() const; (2) (since C++17)
                                                              (deprecated in C++20)


Returns a rvalue-reference or pointer to the current element.


1) Equivalent to std::move(*base()); (until C++17)
1) Equivalent to static_cast<reference>(*base()); (since C++17)


2) Equivalent to base().

Parameters


(none)

Return value


Rvalue-reference or pointer to the current element.

Notes


Note that (2) returns a pointer. When dereferencing a pointer the returned value is an lvalue. This may lead to unintended behavior.

Example


 This section is incomplete
 Reason: no example

See also


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