[libcxx-commits] [PATCH] D103341: [libcxx][nfc] Cleanup cpp20_input_iterator.

Christopher Di Bella via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri May 28 14:36:04 PDT 2021


cjdb added inline comments.


================
Comment at: libcxx/test/support/test_iterators.h:641-642
 struct cpp20_input_iterator {
-  using value_type = std::iter_value_t<I>;
-  using difference_type = std::iter_difference_t<I>;
+  using value_type = typename std::iterator_traits<I>::value_type;
+  using difference_type = typename std::iterator_traits<I>::difference_type;
   using iterator_concept = std::input_iterator_tag;
----------------
cjdb wrote:
> Why?
Upon further thought, removing this opens a gaping hole for when a `I` satisfies `std::input_iterator`, but not _`cpp17-input-iterator`_ and doesn't result in the primary template for `iterator_traits`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103341



More information about the libcxx-commits mailing list