-
Notifications
You must be signed in to change notification settings - Fork 4
Description
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.