1280. Initialization of stream iterators

Section: 27.6.1.1 [istream.iterator.cons], 27.6.2.1 [ostream.iterator.cons.des] Status: C++11 Submitter: Jonathan Wakely Opened: 2009-12-04 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [istream.iterator.cons].

View all issues with C++11 status.

Discussion:

27.6.1.1 [istream.iterator.cons] describes the effects in terms of:

basic_istream<charT,traits>* in_stream; // exposition only

3 Effects: Initializes in_stream with s.

That should be &s and similarly for 27.6.2.1 [ostream.iterator.cons.des].

[ 2009-12-23 Moved to Tentatively Ready after 6 positive votes on c++std-lib. ]

Proposed resolution:

Change 27.6.1.1 [istream.iterator.cons] like so:

istream_iterator(istream_type& s);

3 Effects: Initializes in_stream with &s. value ...

And 27.6.2.1 [ostream.iterator.cons.des] like so:

ostream_iterator(ostream_type& s);

1 Effects: Initializes out_stream with &s and delim with null.

ostream_iterator(ostream_type& s, const charT* delimiter);

2 Effects: Initializes out_stream with &s and delim with delimiter.