[libcxx-commits] [PATCH] D99141: [libcxx] adds `std::incrementable_traits` to <iterator>

Christopher Di Bella via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Apr 8 10:55:39 PDT 2021


cjdb added inline comments.


================
Comment at: libcxx/include/__config:851
 
+#if _LIBCPP_STD_VER < 20 || defined(_LIBCPP_HAS_NO_CONCEPTS)
+#define _LIBCPP_HAS_NO_RANGES
----------------
zoecarver wrote:
> cjdb wrote:
> > Quuxplusone wrote:
> > > Please use `<= 17`, for consistency with similar lines in this file. (We tend to guard C++2a stuff on `> 17`. I don't //think// there's anything special about the Ranges stuff in this respect, right?)
> > > Please use `<= 17`, for consistency with similar lines in this file.
> > 
> > Done.
> > 
> > > (We tend to guard C++2a stuff on `> 17`. I don't _think_ there's anything special about the Ranges stuff in this respect, right?)
> > 
> > Not sure I'm following this line of thought, so I'm leaving the comment as unresolved for now.
> > Not sure I'm following this line of thought, so I'm leaving the comment as unresolved for now.
> 
> I don't think this is needed anymore, because C++20 has been released. We did this pre-c++20 (when it was still C++2a) because we weren't //sure// it would be released in C++20 (i.e., if there was a global pandemic...). But, it was still released on time, and it //is// C++20, so I think we can guard on that now. 
I still don't understand, sorry 😭 


================
Comment at: libcxx/test/std/iterators/iterator.requirements/iterator.assoc.types/incrementable.traits/incrementable_traits.compile.pass.cpp:149
+                                                 cv_qualifier&& noexcept >);   \
+  /**/
+
----------------
zoecarver wrote:
> What's the comment for?
Paging @ldionne. He's not the only Boost dev I've seen do this.


================
Comment at: libcxx/test/std/iterators/iterator.requirements/iterator.assoc.types/incrementable.traits/incrementable_traits.compile.pass.cpp:245
+TEST_NOT_DIFFERENCE_TYPE(&, NO_QUALIFIER);
+// TEST_NOT_DIFFERENCE_TYPE(const&, NO_QUALIFIER); // == true
+TEST_NOT_DIFFERENCE_TYPE(volatile&, NO_QUALIFIER);
----------------
zoecarver wrote:
> What's going on here? Why is this commented?
I think it would be best to keep the commented out lines there to show these permutations weren't forgotten, but they can't be enabled because they actually pass.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99141



More information about the libcxx-commits mailing list