]> 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>
Wed, 22 Mar 2023 17:48:19 +0000 (17:48 +0000)
commitad0b9cf1a076fb9a802d9ba7fa2223aa3166dca2
treede8bf89f7660bfb22684e73f485c7b33a6594e3b
parent81d762cbec9685c2f2571da21d48f42c42eff33b
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.
libstdc++-v3/include/bits/stream_iterator.h
libstdc++-v3/testsuite/24_iterators/istream_iterator/cons/constexpr.cc
This page took 0.060499 seconds and 5 git commands to generate.