forked from OSchip/llvm-project
12b01ab7fa
The Standard documents the signature of std::advance as template <class Iter, class Distance> constexpr void advance(Iter& i, Distance n); Furthermore, it does not appear to put any restriction on what the type of Distance should be. While it is understood that it should usually be std::iterator_traits::difference_type, I couldn't find any wording that mandates that. Similarly, I couldn't find wording that forces the distance to be a signed type. This patch changes std::advance to accept any type in the second argument, which appears to be what the Standard mandates. We then coerce it to the iterator's difference type, but that's an implementation detail. Differential Revision: https://reviews.llvm.org/D81425 |
||
---|---|---|
.. | ||
benchmarks | ||
cmake | ||
docs | ||
fuzzing | ||
include | ||
lib | ||
src | ||
test | ||
utils | ||
www | ||
.clang-format | ||
.gitignore | ||
CMakeLists.txt | ||
CREDITS.TXT | ||
LICENSE.TXT | ||
NOTES.TXT | ||
TODO.TXT | ||
appveyor-reqs-install.cmd | ||
appveyor.yml |