[libcxx-commits] [PATCH] D101277: [libcxx][iterator] adds `indirectly_[regular_]unary_invocable` and `projected`

Christopher Di Bella via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 27 15:32:31 PDT 2021


cjdb accepted this revision.
cjdb added inline comments.


================
Comment at: libcxx/docs/OneRangesProposalStatus.csv:20-21
 bidirectional_iterator: `D100278 <https://llvm.org/D100278>`_",
-[indirectcallable.indirectinvocable],"indirectly_unary_invocable, indirectly_regular_unary_invocable, indirectly_unary_predicate, indirectly_binary_predicate, indirectly_equivalence_relation, and indirectly_strict_weak_order.","[concepts], [readable.traits]: iter_value_t, [iterator.traits]",,,
-[projected],,[iterator.concepts],,,
+[indirectcallable.indirectinvocable],"indirectly_unary_invocable, indirectly_regular_unary_invocable, indirectly_unary_predicate, indirectly_binary_predicate, indirectly_equivalence_relation, and indirectly_strict_weak_order.","[concepts], [readable.traits]: iter_value_t, [iterator.traits]",Louis Dionne,https://reviews.llvm.org/D101277,✅
+[projected],,[iterator.concepts],Louis Dionne,https://reviews.llvm.org/D101277,✅
 [common.alg.req]: pt. 1,"indirectly_movable, indirectly_movable_storable, indirectly_copyable, and indirectly_copyable_storable.",[iterator.concepts],,,
----------------
I've got a big change coming for this csv, so I'd prefer to add it in mine (it'll screw up my doc right now).


================
Comment at: libcxx/include/__iterator/indirect_concepts.h:94-103
+// [projected], projected
+template<indirectly_readable _It, indirectly_regular_unary_invocable<_It> _Proj>
+struct projected {
+  using value_type = remove_cvref_t<indirect_result_t<_Proj&, _It>>;
+  indirect_result_t<_Proj&, _It> operator*() const; // not defined
+};
+
----------------
This should probably get its own header.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101277/new/

https://reviews.llvm.org/D101277



More information about the libcxx-commits mailing list