[libcxx-commits] [PATCH] D135248: [libc++] implement move_iterator<T*> should be a random access iterator

Shivam Rajput via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 5 06:52:57 PDT 2022


phyBrackets added inline comments.


================
Comment at: libcxx/include/__iterator/move_iterator.h:64
+   
+   static constexpr auto _Get_Iterator_Tag() {
+     if constexpr (__is_cpp17_random_access_iterator<_Iter>::value) {
----------------
huixie90 wrote:
> philnik wrote:
> > You can make this function `consteval`. IMO Something like `__get_iterator_concept()` would be clearer, since iterator tags are used for both `iterator_category` and `iterator_concept`, but this function is only correct for `iterator_concept`. You also have to guard the functions with `_LIBCPP_STD_VER >= 20`.
> either add `_LIBCPP_HIDE_FROM_ABI` macro, or change the function to `consteval`
doesn't _LIBCPP_STD_VER  > 17 means the same?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135248



More information about the libcxx-commits mailing list