This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD status.

2916. Insert iterators should each have an instantiation guide to initialize from a container

Section: 25.5.2 [insert.iterators] Status: NAD Submitter: United States Opened: 2017-02-03 Last modified: 2020-09-06

Priority: Not Prioritized

View all other issues in [insert.iterators].

View all issues with NAD status.

Discussion:

Addresses US 151

The three insert iterators should each have an instantiation guide to initialize from a container.

Proposed change:

Add to the <iterator> header synopsis:

template <class Container>
back_insert_iterator(Container&) -> back_insert_iterator<Container>;
template <class Container>
front_insert_iterator(Container&) -> back_insert_iterator<Container>;
template <class Container>
insert_iterator(Container&, typename Container::iterator) -> insert_iterator<Container>;

[2017-07 Toronto Thurs Issue Prioritization]

After the core changes in Kona, these guides are no longer necessary; the implicit ones are sufficient.

Proposed resolution:

This wording is relative to N4618.

  1. Add to the synopsis of <iterator>:

    
    template <class Container> back_insert_iterator(Container&) -> back_insert_iterator<Container>;
    template <class Container> front_insert_iterator(Container&) -> back_insert_iterator<Container>;
    template <class Container> insert_iterator(Container&, typename Container::iterator) -> insert_iterator<Container>;