Skip to content

US264 23.03.4.2 Problems with "readable" concept P1878 #260

@wg21bot

Description

@wg21bot

The readable concept is both under- and over-constrained. It is under-constrained in that it permits its associated types (iter_value_t, iter_reference_t, etc) to differ depending on whether the type is const-qualified or not. It might make sense for iter_reference_t to be sensitive to const-ness if, for example, it is our intention for a type like optional to satisfy readable. Generally we use readable to constrain types that are logical indirections; e.g., pointers (smart and dumb) and iterators. For those, top-level cv-qualification should not matter.

readable is over-constrained because it only requires operator* to be valid on a (non-const) lvalue.

See discussion at ericniebler/stl2#514

Proposed change:
Change the definition of the readable concept to correct these problems.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions