[libcxx-commits] [PATCH] D150493: [libc++] Add functions that ensure a given iterator meets the syntactic requirements
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon May 15 09:03:08 PDT 2023
ldionne added inline comments.
================
Comment at: libcxx/include/__iterator/check_iterators.h:51
+template <class _Iterator>
+_LIBCPP_CONSTEXPR void __check_iterator_requirements() {
+ static_assert(__has_dereference_operator<_Iterator&>::value, "Iterator has to be dereferenceable");
----------------
I am a bit uneasy about adding yet another way to check for iterator-ness, since we already have `__is_cpp17_forward_iterator` and the `forward_iterator` concept in C++20. Let's discuss this some more later when we have more time.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150493/new/
https://reviews.llvm.org/D150493
More information about the libcxx-commits
mailing list