Title
Insert iterator constructors should use addressof()
Status
c++14
Section
[back.insert.iter.ops] [front.insert.iter.ops] [insert.iter.ops]
Submitter
Stephan T. Lavavej

Created on 2013-09-21.00:00:00 last changed 130 months ago

Messages

Date: 2014-02-13.06:35:03

Proposed resolution:

This wording is relative to N3691.

  1. Edit [back.insert.iter.cons]/1 as indicated:

    explicit back_insert_iterator(Container& x);
    

    -1- Effects: Initializes container with &xstd::addressof(x).

  2. Edit [front.insert.iter.cons]/1 as indicated:

    explicit front_insert_iterator(Container& x);
    

    -1- Effects: Initializes container with &xstd::addressof(x).

  3. Edit [insert.iter.cons]/1 as indicated:

    insert_iterator(Container& x, typename Container::iterator i);
    

    -1- Effects: Initializes container with &xstd::addressof(x) and iter with i.

Date: 2014-02-13.06:35:03

[ Issaquah 2014-02-11: Move to Immediate ]

Date: 2013-09-21.00:00:00

[back.insert.iter.cons]/1, [front.insert.iter.cons]/1, and [insert.iter.cons]/1 say "Initializes container with &x", which doesn't defend against containers overloading operator&(). Containers are now required to have such defenses for their elements, so we may as well be consistent here.

History
Date User Action Args
2014-02-27 17:03:20adminsetstatus: wp -> c++14
2014-02-20 13:52:38adminsetstatus: immediate -> wp
2014-02-13 06:35:03adminsetmessages: + msg6835
2014-02-13 06:35:03adminsetstatus: new -> immediate
2013-10-11 21:22:24adminsetmessages: + msg6716
2013-09-21 00:00:00admincreate