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

1280. Initialization of stream iterators

Section: 24.6.2.2 [istream.iterator.cons], 24.6.3.2 [ostream.iterator.cons.des] Status: C++11 Submitter: Jonathan Wakely Opened: 2009-12-04 Last modified: 2016-01-28

Priority: Not Prioritized

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

View all issues with C++11 status.

Discussion:

24.6.2.2 [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 24.6.3.2 [ostream.iterator.cons.des].

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

Proposed resolution:

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

istream_iterator(istream_type& s);

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

And 24.6.3.2 [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.