[libcxx-commits] [PATCH] D119029: [libc++] [D2358R0] ADL-proof `projected`
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Feb 4 12:16:08 PST 2022
Quuxplusone created this revision.
Quuxplusone added a reviewer: libc++.
Quuxplusone added a project: libc++.
Quuxplusone requested review of this revision.
Herald added a subscriber: libcxx-commits.
Herald added 1 blocking reviewer(s): libc++.
This implements D2538R0 "ADL-proof std::projected", just to prove
that it works.
Notice that because `Holder<Incomplete>` is _possible_ to complete,
but _unsafe_ to complete, that means that `Holder<Incomplete>*`
is basically not an iterator and it's not even safe to ask if
`input_iterator<Holder<Incomplete>*>` because that _will_ necessarily
complete the type. So it's totally expected that we still cannot
safely ask e.g.
static_assert(std::indirect_unary_predicate<bool(&)(Holder<Incomplete>&), Holder<Incomplete>*>);
or even
static_assert(!std::indirect_unary_predicate<int, Holder<Incomplete>*>);
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D119029
Files:
libcxx/include/__iterator/projected.h
libcxx/test/std/iterators/iterator.requirements/indirectcallable/indirectinvocable/indirect_binary_predicate.compile.pass.cpp
libcxx/test/std/iterators/iterator.requirements/indirectcallable/indirectinvocable/indirect_equivalence_relation.compile.pass.cpp
libcxx/test/std/iterators/iterator.requirements/indirectcallable/indirectinvocable/indirect_result_t.compile.pass.cpp
libcxx/test/std/iterators/iterator.requirements/indirectcallable/indirectinvocable/indirect_strict_weak_order.compile.pass.cpp
libcxx/test/std/iterators/iterator.requirements/indirectcallable/indirectinvocable/indirect_unary_predicate.compile.pass.cpp
libcxx/test/std/iterators/iterator.requirements/indirectcallable/indirectinvocable/indirectly_comparable.compile.pass.cpp
libcxx/test/std/iterators/iterator.requirements/indirectcallable/indirectinvocable/indirectly_regular_unary_invocable.compile.pass.cpp
libcxx/test/std/iterators/iterator.requirements/indirectcallable/indirectinvocable/indirectly_unary_invocable.compile.pass.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119029.406067.patch
Type: text/x-patch
Size: 9849 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220204/1f726f8e/attachment.bin>
More information about the libcxx-commits
mailing list