[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
Mon Aug 23 21:19:15 PDT 2021
jloser updated this revision to Diff 368267.
jloser added a comment.
Unconditionally include <__ranges/access.h>
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108575/new/
https://reviews.llvm.org/D108575
Files:
libcxx/include/__iterator/insert_iterator.h
Index: libcxx/include/__iterator/insert_iterator.h
===================================================================
--- libcxx/include/__iterator/insert_iterator.h
+++ libcxx/include/__iterator/insert_iterator.h
@@ -14,6 +14,7 @@
#include <__iterator/iterator.h>
#include <__iterator/iterator_traits.h>
#include <__memory/addressof.h>
+#include <__ranges/access.h>
#include <__utility/move.h>
#include <cstddef>
@@ -36,8 +37,12 @@
_LIBCPP_SUPPRESS_DEPRECATED_POP
protected:
_Container* container;
- typename _Container::iterator iter; // FIXME: `ranges::iterator_t<Container>` in C++20 mode
-public:
+#if _LIBCPP_STD_VER > 17
+ ranges::iterator_t<_Container> iter;
+#else
+ typename _Container::iterator iter;
+#endif
+ public:
typedef output_iterator_tag iterator_category;
typedef void value_type;
#if _LIBCPP_STD_VER > 17
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108575.368267.patch
Type: text/x-patch
Size: 863 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210824/87f77f26/attachment.bin>
More information about the libcxx-commits
mailing list