问题
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:
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
来源:https://stackoverflow.com/questions/36265718/front-and-back-proposal-for-iterators-library