================ @@ -2113,12 +2113,63 @@ void erase(Container &C, ValueType V) { C.erase(std::remove(C.begin(), C.end(), V), C.end()); } +namespace detail { +template <typename Range> +using check_has_member_iterator_category_t = + typename decltype(std::declval<Range &>().begin())::iterator_category; + +template <typename Range> +static constexpr bool HasMemberIteratorCategory = + is_detected<check_has_member_iterator_category_t, Range>::value; ---------------- kuhar wrote:
iterator_traits should already handle plain pointers, so I think we'd want to use that instead of looking for `iterator_category`? https://github.com/llvm/llvm-project/pull/136543 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits