[all-commits] [llvm/llvm-project] 4d08ec: [libc++] Implement P2538R1 "ADL-proof std::project...

Louis Dionne via All-commits all-commits at lists.llvm.org
Fri Sep 15 07:09:52 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4d08eccd63669a6ff39b6aa01f46b4d467e6d489
      https://github.com/llvm/llvm-project/commit/4d08eccd63669a6ff39b6aa01f46b4d467e6d489
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2023-09-15 (Fri, 15 Sep 2023)

  Changed paths:
    M libcxx/docs/ReleaseNotes/18.rst
    M libcxx/docs/Status/Cxx2cPapers.csv
    M libcxx/include/__iterator/projected.h
    M libcxx/test/std/iterators/iterator.requirements/indirectcallable/indirectinvocable/indirect_binary_predicate.compile.pass.cpp
    M libcxx/test/std/iterators/iterator.requirements/indirectcallable/indirectinvocable/indirect_equivalence_relation.compile.pass.cpp
    M libcxx/test/std/iterators/iterator.requirements/indirectcallable/indirectinvocable/indirect_result_t.compile.pass.cpp
    M libcxx/test/std/iterators/iterator.requirements/indirectcallable/indirectinvocable/indirect_strict_weak_order.compile.pass.cpp
    M libcxx/test/std/iterators/iterator.requirements/indirectcallable/indirectinvocable/indirect_unary_predicate.compile.pass.cpp
    M libcxx/test/std/iterators/iterator.requirements/indirectcallable/indirectinvocable/indirectly_comparable.compile.pass.cpp
    M libcxx/test/std/iterators/iterator.requirements/indirectcallable/indirectinvocable/indirectly_regular_unary_invocable.compile.pass.cpp
    M libcxx/test/std/iterators/iterator.requirements/indirectcallable/indirectinvocable/indirectly_unary_invocable.compile.pass.cpp
    M libcxx/utils/data/ignore_format.txt

  Log Message:
  -----------
  [libc++] Implement P2538R1 "ADL-proof std::projected" (#65411)

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

This was originally uploaded as https://reviews.llvm.org/D119029 and I
picked it up here as part of the Github PR transition.

Co-authored-by: Arthur O'Dwyer <arthur.j.odwyer at gmail.com>




More information about the All-commits mailing list