1

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?

Jonathan Mee
  • 37,899
  • 23
  • 129
  • 288
  • 2
    It is better to ask such a question at isocpp.org. – Vlad from Moscow Mar 28 '16 at 15:44
  • Isn't this something you could find out searching [here](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/)? – NathanOliver Mar 28 '16 at 16:00
  • @NathanOliver Am I missing the search functionality there? I'm sure there's some Google-Fu that would let me accomplish some sort of depth first search... I'm just not sure how to do it. – Jonathan Mee Mar 28 '16 at 16:04
  • @VladfromMoscow A good suggestion. I've never posted over there to be honest, but maybe it's time to change that. Interestingly I found [this](https://groups.google.com/a/isocpp.org/forum/?fromgroups#!searchin/std-discussion/front/std-discussion/eJdDI2q1xKg/ceTNszqbBwAJ) by searching the forum. – Jonathan Mee Mar 28 '16 at 16:06
  • @JonathanMee Yes it would require google foo. You could do something like `site:http://www.open-std.org/jtc1/sc22/wg21/docs/papers/ search term(s)` – NathanOliver Mar 28 '16 at 16:10
  • @NathanOliver By searching with `std::front` or `std::back` for my "search term" I am able to find N4017. But I got more information from [searching the forum](http://stackoverflow.com/questions/36265718/front-and-back-proposal-for-iterators-library?noredirect=1#comment60159875_36265718). Namely information that this had been thrown out of C++17, and there is currently no attempt to renter it... – Jonathan Mee Mar 28 '16 at 18:12

1 Answers1

4

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

Yakk - Adam Nevraumont
  • 262,606
  • 27
  • 330
  • 524
Jonathan Mee
  • 37,899
  • 23
  • 129
  • 288