libstdc++: Fix noexcept-specifier for istream_iterator
authorJonathan Wakely <jwakely@redhat.com>
Mon, 24 Feb 2020 14:22:21 +0000 (14:22 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 24 Feb 2020 14:22:21 +0000 (14:22 +0000)
commit8566286eaeb9a977339df88212826150767f1203
treed11efa9029570f584224de11a20ce5de2b31a7eb
parent32b8f5df9f05426c82c6de1acaf9ca4aec68039d
libstdc++: Fix noexcept-specifier for istream_iterator

Somehow I missed that the _M_value member can throw on construction.

* include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
Make noexcept-specifier conditional.
* testsuite/24_iterators/istream_iterator/cons/sentinel.cc: Check
noexcept-specifier.
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stream_iterator.h
libstdc++-v3/testsuite/24_iterators/istream_iterator/cons/sentinel.cc