A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/LWG/issue3292 below:

Issue 3292: iota_view is under-constrained

This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++20 status.

3292. iota_view is under-constrained

Section: 25.6.4.2 [range.iota.view] Status: C++20 Submitter: Barry Revzin Opened: 2019-09-13 Last modified: 2021-02-25

Priority: Not Prioritized

View all other issues in [range.iota.view].

View all issues with C++20 status.

Discussion:

P1207R4 changed weakly_incrementable from requiring semiregular to requiring default_constructible && movable.

iota_view currently is specified to require that W be just weakly_incrementable. But we have to copy the W from the view into its iterator and also in operator*() to return a W. The shortest resolution is just to add " && semiregular<W>" to the class constraints.

[Status to ready after discussion Friday morning in Belfast]

Proposed resolution:

This wording is relative to N4830.

  1. Modify 25.6.4.2 [range.iota.view] as indicated:

    namespace std::ranges {
      […]
      template<weakly_incrementable W, semiregular Bound = unreachable_sentinel_t>
        requires weakly-equality-comparable-with<W, Bound> && semiregular<W>
      class iota_view : public view_interface<iota_view<W, Bound> {
        […]
      };
      […]
    }
    

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4