llvm-project/libcxx
Arthur O'Dwyer 85d4e29fd8 [libc++] Fix __wrap_iter to be a proper contiguous iterator.
Instead of overloading `__to_address`, let's specialize `pointer_traits`.
Function overloads need to be in scope at the point where they're called,
whereas template specializations do not. (User code can provide pointer_traits
specializations to be used by already-included library code, so obviously
`__wrap_iter` can do the same.)

`pointer_traits<__wrap_iter<It>>` cannot provide `pointer_to`, because
you generally cannot create a `__wrap_iter` without also knowing the
identity of the container into which you're trying to create an iterator.
I believe this is OK; contiguous iterators are required to provide
`to_address` but *not* necessarily `pointer_to`.

Differential Revision: https://reviews.llvm.org/D110198
2021-09-22 18:51:46 -04:00
..
benchmarks [test] Migrate -gcc-toolchain with space separator to --gcc-toolchain= 2021-08-20 15:24:58 -07:00
cmake [LLVM][CMake][NFC] Resolve FIXME: Rename LLVM_CMAKE_PATH to LLVM_CMAKE_DIR throughout the project 2021-09-16 18:29:57 +02:00
docs [libc++][NFC] Add link to Discord channel from documentation 2021-09-22 11:13:53 -04:00
include [libc++] Fix __wrap_iter to be a proper contiguous iterator. 2021-09-22 18:51:46 -04:00
lib [libc++][NFC] Add missing commits to the ABI changelog 2021-07-20 09:19:52 -04:00
src [libc++abi] Remove unnecessary atomic_support.h header from libc++abi 2021-09-21 19:55:21 -04:00
test [libc++] Fix __wrap_iter to be a proper contiguous iterator. 2021-09-22 18:51:46 -04:00
utils [libc++] Implement C++20's P0476R2: std::bit_cast 2021-09-09 11:05:54 -04:00
.clang-format [libcxx][NFC] removes IndentRequires from .clang-format 2021-04-15 19:28:45 +00:00
.gitignore [libcxx] Fix .gitignore to not exclude test directories 2020-03-25 17:52:23 -07:00
CMakeLists.txt [libc++][NFC] Reindent documentation for LIBCXX_ENABLE_UNICODE 2021-09-09 11:14:39 -04:00
CREDITS.TXT [libc++] Update credits.txt per coment on D108263 2021-08-20 08:42:36 -04:00
LICENSE.TXT
TODO.TXT [libc++] Disallow volatile types in std::allocator 2021-09-22 11:47:38 -04:00
appveyor-reqs-install.cmd
appveyor.yml