Skip to content
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

Exposition-only alias templates for associative container deduction guides #1523

Closed
jwakely opened this issue Mar 7, 2017 · 3 comments
Closed
Assignees

Comments

@jwakely
Copy link
Member

jwakely commented Mar 7, 2017

(This applies to the changes in https://github.com/cplusplus/draft/tree/motions-2017-03-lwg-19.)

We have iter_key_t and iter_val_t for the key_type and mapped_type, which are only applicable to maps. We could rename iter_val_t to iter_mapped_t and then define another alias template with the name iter_val_t to be the iterator's value_type. That would allow it to be used in the deduction guides for sets, as well as in the iter_key_t and iter_mapped_t types.

@timsong-cpp
Copy link
Contributor

If we do this, the new iter_val_t can also be used in all the other places where currently typename iterator_traits<InputIterator>::value_type is spelled out.

@jensmaurer jensmaurer added the decision-required A decision of the editorial group (or the Project Editor) is required. label Oct 19, 2017
@jensmaurer
Copy link
Member

Editorial meeting consensus: Yes, we want more exposition-only typedef in these cases. The name should be italics and have hyphens and remove _t. Suggest -type.

@jwakely jwakely self-assigned this Nov 7, 2017
@jensmaurer jensmaurer removed the decision-required A decision of the editorial group (or the Project Editor) is required. label Nov 7, 2017
@jwakely
Copy link
Member Author

jwakely commented Nov 7, 2017

We should also change the presentation to e.g. iter-mapped-type so it's clearly not a real type, but an exposition only name.

jwakely added a commit to jwakely/draft that referenced this issue Mar 21, 2018
…plates

Also rename iter_val_t to iter-mapped-type and then add iter-value-type
for value_type.

Fixes cplusplus#1523
jwakely added a commit to jwakely/draft that referenced this issue Mar 21, 2018
…plates

Also rename iter_val_t to iter-mapped-type and then add iter-value-type
for value_type.

Fixes cplusplus#1523
jwakely added a commit to jwakely/draft that referenced this issue Mar 24, 2018
…plates

Also rename iter_val_t to iter-mapped-type and then add iter-value-type
for value_type.

Fixes cplusplus#1523
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants