Page MenuHomePhabricator

Remove addtional parameters in function std::next() and std::prev()
ClosedPublic

Authored by jasonliu on Jun 26 2017, 3:18 PM.

Details

Summary

Creating a function pointer with proper parameters pointing to std::next() or std::prev() should work.
This change moves the invented paramater for enable_if over to the return type to resolve this QoI issue.

Diff Detail

Repository
rL LLVM

Event Timeline

jasonliu created this revision.Jun 26 2017, 3:18 PM
Quuxplusone added inline comments.
include/iterator
619 ↗(On Diff #104030)

Might fix the spelling error in "BidirectionalIter" while you're here.

EricWF accepted this revision.Jul 5 2017, 5:55 PM

Creating a function pointer with proper parameters pointing to std::next() or std::prev() should work.

Actually, according to the standard taking the address of a STL function is UB, and users should avoid doing it as much as possible since it's fundamentally non-portable.

However as a QoI change I think this is OK.

This revision is now accepted and ready to land.Jul 5 2017, 5:55 PM
This revision was automatically updated to reflect the committed changes.