]> gcc.gnu.org Git - gcc.git/commit
libstdc++: Make std::istream_iterator copy ctor constexpr (LWG 3600)
authorJonathan Wakely <jwakely@redhat.com>
Wed, 22 Mar 2023 11:10:38 +0000 (11:10 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 18 Mar 2024 13:50:53 +0000 (13:50 +0000)
commitaf1efe9ffeb4d21e2895081be1b88031166cdb93
tree7de32858f17355745365454124508240a6d21e19
parent3d7dc8f0ae9ee812f142556a3e827cd5ea115748
libstdc++: Make std::istream_iterator copy ctor constexpr (LWG 3600)

As explained in LWG 3600, we never implemented a C++0x change that made
the copy constructor of std::istream_iterator defined as defaulted. That
would be an ABI break, so the resolution of LWG 3600 is to not require
it to be trivial, but just constexpr and conditionally noexcept. This
applies that resolution.

libstdc++-v3/ChangeLog:

* include/bits/stream_iterator.h (istream_iterator): Add
constexpr to copy constructor, as per LWG 3600.
* testsuite/24_iterators/istream_iterator/cons/constexpr.cc:
Check copy construction.

(cherry picked from commit ad0b9cf1a076fb9a802d9ba7fa2223aa3166dca2)
libstdc++-v3/include/bits/stream_iterator.h
libstdc++-v3/testsuite/24_iterators/istream_iterator/cons/constexpr.cc
This page took 0.06541 seconds and 6 git commands to generate.