-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
Arthur O'Dwyer
committed
Sep 22, 2021
1 parent
35f7020
commit 85d4e29
Showing
3 changed files
with
33 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters