Skip to content

DE288 24.07 Overspecification of return types of view adaptors P1739 P1391 P1394 P1664 #284

@wg21bot

Description

@wg21bot

By fully specifying the types returned by view adaptors, the standard
forces the return type of multiple chained view operations to be an
increasingly nested template. In general this is not avoidable, but for
certain combinations of input ranges and view adaptors, one can simply
create a modified object of the original type (e.g. with different
bounds). Not addressing this is a design flaw that needlessly
complicates working with views.

Proposed change:

  1. Adopt P1739 and in this context also P1391 and P1394 which are
    strongly suggested by P1739. All three papers have been seen and
    approved by LEWG. P1739 cannot be adopted after C++20 without breaking API.
  2. Discuss whether P1664 (or parts of it) should also be adopted. P1664
    generalises the notion of "reconstructible ranges" (those affected by
    P1739).
  3. Evaluate whether any other combinations of range and view adaptor
    should get special treatment; any such changes after C++20 are breaking.generalises the notion of "reconstructible ranges" (those affected by
    P1739).
  4. Evaluate whether any other combinations of range and view adaptor
    should get special treatment; any such changes after C++20 are breaking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions