llvm-project/libcxx
Louis Dionne 12b01ab7fa [libc++] Don't trigger unsigned conversion warnings in std::advance
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
2020-06-16 13:47:47 -04:00
..
benchmarks Revert "[libcxx] Enable C++17 for the benchmarks." 2020-03-12 22:23:46 +01:00
cmake [libc++][CMake] Add CMake caches for commonly supported configurations 2020-06-09 14:52:14 -04:00
docs [libc++] Remove workarounds for the lack of clock_gettime on older macOS platforms 2020-06-09 12:57:03 -04:00
fuzzing [libc++] Tolerate NaN returning random distributions for now 2019-12-12 17:11:13 -05:00
include [libc++] Don't trigger unsigned conversion warnings in std::advance 2020-06-16 13:47:47 -04:00
lib [libc++] Fix the no-exceptions build of libc++ on Apple 2020-04-20 10:45:14 -04:00
src [libc++] Remove workarounds for the lack of clock_gettime on older macOS platforms 2020-06-09 12:57:03 -04:00
test [libc++] Don't trigger unsigned conversion warnings in std::advance 2020-06-16 13:47:47 -04:00
utils [libc++] Automatically create the %T directory inside config tests 2020-06-15 19:32:06 -04:00
www [libc++] [LWG3201] Update status page: lerp should be marked noexcept. 2020-05-25 22:28:21 +02:00
.clang-format
.gitignore [libcxx] Fix .gitignore to not exclude test directories 2020-03-25 17:52:23 -07:00
CMakeLists.txt [libc++] Link against libatomic when it is found 2020-06-05 09:28:44 -04:00
CREDITS.TXT [libcxx] Adds [concept.same] 2020-04-08 18:00:13 -04:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
NOTES.TXT Reland "Use custom command and target to install libc++ headers" 2018-06-12 03:10:02 +00:00
TODO.TXT
appveyor-reqs-install.cmd Attempt to upgrade compiler used by appveyor builds 2019-04-03 20:40:01 +00:00
appveyor.yml disable appveyor config for MSVC 2015 2019-04-03 20:36:51 +00:00