Re: [PATCH] Optimize std::advance for single increments

2017-06-05 Thread Jonathan Wakely
On 05/06/17 12:47 +0200, Marc Glisse wrote: On Mon, 5 Jun 2017, Jonathan Wakely wrote: LWG 2931 suggests a new overload of std::next for the default n==1 case, because it can be simpler for some random access iterators to do ++i than i += 1, e.g. for std::deque::iterator. I've suggested we clo

Re: [PATCH] Optimize std::advance for single increments

2017-06-05 Thread Marc Glisse
On Mon, 5 Jun 2017, Jonathan Wakely wrote: LWG 2931 suggests a new overload of std::next for the default n==1 case, because it can be simpler for some random access iterators to do ++i than i += 1, e.g. for std::deque::iterator. I've suggested we close that issue as NAD, because we don't need a

[PATCH] Optimize std::advance for single increments

2017-06-05 Thread Jonathan Wakely
LWG 2931 suggests a new overload of std::next for the default n==1 case, because it can be simpler for some random access iterators to do ++i than i += 1, e.g. for std::deque::iterator. I've suggested we close that issue as NAD, because we don't need a new overload to do that, and here's the proo