-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
value_type
of classes with member element_type
#299
Comments
LWG: Add a note explaining the |
Did this section move? It's under [iterator.assoc.types.value_type] for me. |
If not, should it be moved to [iterators.readable]? |
Sorry for the question, but could someone explain why do we need to mix |
I can imagine a case where it matters: struct S {
using value_type = void;
using element_type = int;
}; Today, this is ambiguous and an error. That's (IMO) a good thing. If we changed the I'll grant that this is a fairly contrived example. |
Another nearly-as-contrived example: struct foo {
using value_type = int(float, double);
}; A non-object type cannot be a value type, so It might simplify the design overall to keep |
No, must have been a cut'n'paste error in my issue submission. Fixed. |
* Implement ericniebler/stl2#299 * Implement ericniebler/stl2#363 * Implement ericniebler/stl2#364 * Implement ericniebler/stl2#418 * Remove tuple_find that was dropped from variant ages ago * Implement extension 'structible object concepts * tighten up constrains in the tagged impl
* P0541 * P0547 * P0579 * ericniebler/stl2#155 * ericniebler/stl2#167 * ericniebler/stl2#172 * ericniebler/stl2#229 * ericniebler/stl2#232 * ericniebler/stl2#239 * ericniebler/stl2#241 * ericniebler/stl2#242 * ericniebler/stl2#243 * ericniebler/stl2#244 * ericniebler/stl2#245 * ericniebler/stl2#255 * ericniebler/stl2#286 * ericniebler/stl2#299 * ericniebler/stl2#301 * ericniebler/stl2#310 * ericniebler/stl2#311 * ericniebler/stl2#313 * ericniebler/stl2#322 * ericniebler/stl2#339 * ericniebler/stl2#381 Remove post-increment experiment in `move_iterator`. Remove `EqualityComparable`/`Sentinel<default_sentinel>` extensions to `ostreambuf_iterator`.
* P0541 * P0547 * P0579 * ericniebler/stl2#155 * ericniebler/stl2#167 * ericniebler/stl2#172 * ericniebler/stl2#229 * ericniebler/stl2#232 * ericniebler/stl2#239 * ericniebler/stl2#241 * ericniebler/stl2#242 * ericniebler/stl2#243 * ericniebler/stl2#244 * ericniebler/stl2#245 * ericniebler/stl2#255 * ericniebler/stl2#286 * ericniebler/stl2#299 * ericniebler/stl2#301 * ericniebler/stl2#310 * ericniebler/stl2#311 * ericniebler/stl2#313 * ericniebler/stl2#322 * ericniebler/stl2#339 * ericniebler/stl2#381 Remove post-increment experiment in `move_iterator`. Remove `EqualityComparable`/`Sentinel<default_sentinel>` extensions to `ostreambuf_iterator`.
element_type
instd::pointer_traits
and in the smart pointers is the type of the object the pointer denotes, not the value type of that object (i.e., it can be a cv-qualified type). The specialization ofvalue_type
that usestypename T::element_type
should strip cv-qualifiers from the type.Proposed Resolution:
Modify [iterator.assoc.types.value_type] as follows:
The text was updated successfully, but these errors were encountered: