Skip to content

LWG-3953 iter_move for common_iterator and counted_iterator should return decltype(auto) #4157

@frederick-vs-ja

Description

@frederick-vs-ja

LWG-3953 iter_move for common_iterator and counted_iterator should return decltype(auto)

As far as I know, the wording changes in this LWG issue don't have normative effects, and implementations are not actually required to make any change. However, per the description in the LWG issue, it seems better to switch to use decltype(auto) for the sake of compiler throughput.

Code:

_NODISCARD_FRIEND constexpr iter_rvalue_reference_t<_Iter> iter_move(const common_iterator& _Right) noexcept(

_NODISCARD_FRIEND constexpr iter_rvalue_reference_t<_Iter> iter_move(const counted_iterator& _Right) noexcept(

You can just change iter_rvalue_reference_t<_Iter> to decltype(auto) in these two lines.

This issue is intended for a new contributor (especially one new to GitHub) to get started with the simplest possible change.

Please feel free to submit a pull request if there isn't one already linked here - no need to ask for permission! 😸

You can (and should) link your pull request to this issue using GitHub's close/fix/resolve syntax. (in the PR description not the commit message)

Metadata

Metadata

Assignees

No one assigned

    Labels

    LWGLibrary Working Group issuefixedSomething works now, yay!good first issueGood for newcomers

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions