Page MenuHomePhabricator

[libc++] [D2358R0] ADL-proof `projected`
Changes PlannedPublic

Authored by Quuxplusone on Feb 4 2022, 12:16 PM.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

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>*>);

Diff Detail

Unit TestsFailed

TimeTest
530 mslibcxx CI GCC 11 / C++latest > llvm-libc++-shared-gcc-cfg-in.std/iterators/iterator_requirements/indirectcallable/indirectinvocable::indirect_result_t.compile.pass.cpp
Script: -- : 'COMPILED WITH'; /usr/bin/g++-11 /home/libcxx-builder/.buildkite-agent/builds/387c5e60807a-1/llvm-project/libcxx-ci/libcxx/test/std/iterators/iterator.requirements/indirectcallable/indirectinvocable/indirect_result_t.compile.pass.cpp -nostdinc++ -isystem /home/libcxx-builder/.buildkite-agent/builds/387c5e60807a-1/llvm-project/libcxx-ci/build/generic-gcc/include/c++/v1 -isystem /home/libcxx-builder/.buildkite-agent/builds/387c5e60807a-1/llvm-project/libcxx-ci/build/generic-gcc/include/c++/v1 -I /home/libcxx-builder/.buildkite-agent/builds/387c5e60807a-1/llvm-project/libcxx-ci/libcxx/test/support -std=c++2b -Werror -Wall -Wextra -Wshadow -Wundef -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-c++11-extensions -Wno-user-defined-literals -Wno-noexcept-type -Wno-aligned-allocation-unavailable -Wno-atomic-alignment -Wno-sized-deallocation -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -D_LIBCPP_DISABLE_AVAILABILITY -Wno-macro-redefined -D_LIBCPP_HAS_THREAD_API_PTHREAD -Wno-macro-redefined -D_LIBCPP_ABI_VERSION=1 -fsyntax-only

Event Timeline

Quuxplusone requested review of this revision.Feb 4 2022, 12:16 PM
Quuxplusone created this revision.
Herald added 1 blocking reviewer(s): Restricted Project. · View Herald TranscriptFeb 4 2022, 12:16 PM
Quuxplusone planned changes to this revision.Feb 4 2022, 12:16 PM