front and back Proposal for iterators Library

2019-07-26 21:23发布

In C++17 the iterator library received size, empty, and data allowing statically constructed arrays to behave like containers.

But I don't see a front or back function in the iterator library, which was added to the other containers in C++14: http://en.cppreference.com/mwiki/index.php?title=Special%3ASearch&search=front&button=

Is this something that has been proposed?

1条回答
Rolldiameter
2楼-- · 2019-07-26 21:58

N4017 originally proposed front/back.

The Library Evolution Working Group voted to remove front/back:

Do we want non-member front(), back()?

SF F N A SA
0  6 5 3 1

[Source]

As a result N4107 was revised to N4155 and has been accepted sans front/back.

As of 02/18/16 front/back have not been reproposed: https://groups.google.com/a/isocpp.org/d/topic/std-discussion/eJdDI2q1xKg/discussion

查看更多
登录 后发表回答