Skip to content

<valarray>: P1614R2 added operator== for slice, but not gslice #1676

Description

P1614R2 Adding Spaceship <=> To The Library added operator== to <valarray>'s slice, which contains size_t start(), size(), stride() (see WG21-N4878 [class.slice.overview]).

gslice, which contains size_t start() and valarray<size_t> size(), stride() (see N4878 [class.gslice.overview]), wasn't mentioned in P1614R2. As the valarray members are equality comparable, it would seem consistent and reasonable to add an equality operator to gslice. This seems like an oversight (or if it was intentional, an explanation was missing).

This would be an easy Library Evolution issue to file, or even a small proposal for someone to write.

Originally noticed by statementreply.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis issue is incorrect or by designspaceshipC++20 operator <=>

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions