[libcxx-commits] [PATCH] D108645: [libcxx] [NFCI] Complete helper concept

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Aug 24 12:52:56 PDT 2021


ldionne added a comment.

I think the value of this patch highly depends on whether we're right to look at the completeness of the type in `contiguous_iterator`. If not, then there's no duplication and I don't think this is worth pursuing. If so, then we can go forward but I'd find a different name too or try to make the concept really answer the question "is this type complete?", as Arthur mentioned.



================
Comment at: libcxx/include/__iterator/concepts.h:178
+  same_as<iter_value_t<_Ip>, remove_cvref_t<iter_reference_t<_Ip> >> &&
+  (is_pointer_v<_Ip> || __complete<__pointer_traits_element_type<_Ip> >) && requires(const _Ip& __i) {
     { _VSTD::to_address(__i) } -> same_as<add_pointer_t<iter_reference_t<_Ip>>>;
----------------
Quuxplusone wrote:
> Remove `(is_pointer_v<_Ip> || __complete<__pointer_traits_element_type<_Ip> >) &&`; this is not part of the current working draft's wording.
> https://eel.is/c++draft/iterator.concept.contiguous
> 
> Also, please revert the `>>`-to-`> >` whitespace changes. I know clang-format is to blame. Solution: don't trust (or listen to, or even run) clang-format.
Indeed, I'm not sure why we even have that -- I think it should be removed. @zoecarver do you remember? I didn't review that specific patch. Maybe @cjdb knows too?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108645



More information about the libcxx-commits mailing list