[libcxx-commits] [PATCH] D108575: [libcxx] Define insert_iterator::iter with ranges::iterator_t
Joe Loser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Aug 24 21:29:52 PDT 2021
jloser added inline comments.
================
Comment at: libcxx/include/__iterator/insert_iterator.h:57
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 insert_iterator(_Container& __x, typename _Container::iterator __i)
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 insert_iterator(_Container& __x, decltype(iter) __i)
: container(_VSTD::addressof(__x)), iter(__i) {}
----------------
@cjdb @ldionne @Quuxplusone this is a drive-by fix so that the constructor of `insert_iterator` matches the iter type declared as the protected member. Do we like using `decltype(iter)` here so it's correct in both cases or would we prefer an `#ifdef` here like we do when defining the `iter` member?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108575/new/
https://reviews.llvm.org/D108575
More information about the libcxx-commits
mailing list