[libcxx-commits] [libcxx] 2151b3d - [libc++][ranges][NFC] Update the status of predefined iterators.

Konstantin Varlamov via libcxx-commits libcxx-commits at lists.llvm.org
Thu Feb 10 18:50:14 PST 2022


Author: Konstantin Varlamov
Date: 2022-02-10T18:49:52-08:00
New Revision: 2151b3d093f42db2d4ab9e32e6e5856a2adfbeab

URL: https://github.com/llvm/llvm-project/commit/2151b3d093f42db2d4ab9e32e6e5856a2adfbeab
DIFF: https://github.com/llvm/llvm-project/commit/2151b3d093f42db2d4ab9e32e6e5856a2adfbeab.diff

LOG: [libc++][ranges][NFC] Update the status of predefined iterators.

`{back,front}_insert_iterator` and `ostream{,buf}_iterator` effectively
fully implement the One Ranges Proposal already, so mark them as done:
- the change to `difference_type` was made by D103273;
- default constructors and the associated default member initializers
  were removed by wg21.link/P2325 (implemented by D102468).

Also fix a stale template signature in the `<iterator>` synopsis.

Added: 
    

Modified: 
    libcxx/docs/Status/RangesPaper.csv
    libcxx/include/iterator

Removed: 
    


################################################################################
diff  --git a/libcxx/docs/Status/RangesPaper.csv b/libcxx/docs/Status/RangesPaper.csv
index d93371da5d1b9..f109f02c82760 100644
--- a/libcxx/docs/Status/RangesPaper.csv
+++ b/libcxx/docs/Status/RangesPaper.csv
@@ -67,8 +67,8 @@ Section,Description,Dependencies,Assignee,Complete
 `[alg.req] <https://wg21.link/alg.req>`_: pt. 4,"| `permutable <https://llvm.org/D119222>`_
 | mergeable
 | sortable",[iterator.concepts],Konstantin Varlamov,In progress
-`[std.iterator.tags] <https://wg21.link/std.iterator.tags>`_,"| `contiguous_iterator_tag <https://reviews.llvm.org/rG45d048c20440989df2b4e1be1f9343225e7741ab>`_
-| `iterator_concept specialization for pointers <https://reviews.llvm.org/rG45d048c20440989df2b4e1be1f9343225e7741ab>`_
+`[std.iterator.tags] <https://wg21.link/std.iterator.tags>`_,"| `contiguous_iterator_tag <https://llvm.org/rG45d048c20440989df2b4e1be1f9343225e7741ab>`_
+| `iterator_concept specialization for pointers <https://llvm.org/rG45d048c20440989df2b4e1be1f9343225e7741ab>`_
 ",[iterator.traits],Eric Fiselier,✅
 `[range.iter.ops] <https://wg21.link/range.iter.ops>`_,"| `ranges::advance <https://llvm.org/D101922>`_
 | `ranges::distance <https://llvm.org/D102789>`_
@@ -76,12 +76,12 @@ Section,Description,Dependencies,Assignee,Complete
 | `ranges::prev <https://llvm.org/D102564>`_",[iterator.concepts],Christopher Di Bella and Arthur O'Dwyer,✅
 `[predef.iterators] <https://wg21.link/predef.iterators>`_,"
 | Updates to reverse_iterator
-| Updates to back_insert_iterator
-| Updates to front_insert_iterator
-| Updates to move_iterator","| [iterator.concepts]
+| `Updates to back_insert_iterator <https://llvm.org/D103273>`_
+| `Updates to front_insert_iterator <https://llvm.org/D103273>`_
+| `Updates to move_iterator <https://llvm.org/D117656>`_","| [iterator.concepts]
 | [iterator.cust.swap]
-| [iterator.cust.move]",Unassigned,Not started
-`[move.sentinel] <https://wg21.link/move.sentinel>`_,`move_sentinel <https://reviews.llvm.org/D117656>`_,[predef.iterators],Arthur O'Dwyer,In progress
+| [iterator.cust.move]",Various,In progress
+`[move.sentinel] <https://wg21.link/move.sentinel>`_,`move_sentinel <https://llvm.org/D117656>`_,[predef.iterators],Arthur O'Dwyer,In progress
 `[common.iterator] <https://wg21.link/common.iterator>`_,`common_iterator <https://llvm.org/D103335>`_,"| [iterator.concepts]
 | [iterator.cust.swap]
 | [iterator.cust.move]",Zoe Carver,✅
@@ -92,10 +92,10 @@ Section,Description,Dependencies,Assignee,Complete
 | [default.sentinels]",Zoe Carver,✅
 `[stream.iterators] <https://wg21.link/stream.iterators>`_,"
 | Updates to istream_iterator
-| Updates to ostream_iterator
+| `Updates to ostream_iterator <https://llvm.org/https://llvm.org/D103273>`_
 | Updates to istreambuf_iterator
-| Updates to ostreambuf_iterator
-",[default.sentinels],Unassigned,Not started
+| `Updates to ostreambuf_iterator <https://llvm.org/https://llvm.org/D103273>`_
+",[default.sentinels],Various,In progress
 `[range.access] <https://wg21.link/range.access>`_,"| `ranges::begin <https://llvm.org/D100255>`_
 | `ranges::end <https://llvm.org/D100255>`_
 | `range::cbegin <https://llvm.org/D100255>`_

diff  --git a/libcxx/include/iterator b/libcxx/include/iterator
index 654ca75804c23..da920f3d1c0e6 100644
--- a/libcxx/include/iterator
+++ b/libcxx/include/iterator
@@ -344,8 +344,10 @@ public:
     insert_iterator& operator++(int);  // constexpr in C++20
 };
 
-template <class Container, class Iterator>
-insert_iterator<Container> inserter(Container& x, Iterator i);  // constexpr in C++20
+template <class Container>
+insert_iterator<Container> inserter(Container& x, typename Container::iterator i);  // until C++20
+template <class Container>
+constexpr insert_iterator<Container> inserter(Container& x, ranges::iterator_t<Container> i);  // since C++20
 
 template <class Iterator>
 class move_iterator {


        


More information about the libcxx-commits mailing list