[Bug libstdc++/83981] vector::resize(size_type) should not require T to be CopyInsertable when std=c++14

2023-02-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83981 Jonathan Wakely changed: What|Removed |Added CC||dan.raviv at gmail dot com ---

[Bug libstdc++/83981] vector::resize(size_type) should not require T to be CopyInsertable when std=c++14

2023-02-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83981 Jonathan Wakely changed: What|Removed |Added CC||lemo1234 at gmail dot com --- Comment

[Bug libstdc++/83981] vector::resize(size_type) should not require T to be CopyInsertable when std=c++14

2018-01-26 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83981 --- Comment #14 from Jonathan Wakely --- (In reply to Daniel Krügler from comment #11) > (In reply to Jonathan Wakely from comment #10) > > Perhaps Daniel can comment, since he wrote the resolution of lwg 2033. > > > > Daniel, if the intent was

[Bug libstdc++/83981] vector::resize(size_type) should not require T to be CopyInsertable when std=c++14

2018-01-25 Thread dtrebbien at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83981 --- Comment #13 from Daniel Trebbien --- (In reply to Jonathan Wakely from comment #9) > Also, if boost::optional had a noexcept move constructor it would work fine. > This is a boost bug. > > The part of the patch addressing PR 83982 seems

[Bug libstdc++/83981] vector::resize(size_type) should not require T to be CopyInsertable when std=c++14

2018-01-25 Thread dtrebbien at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83981 --- Comment #12 from Daniel Trebbien --- https://wg21.link/lwg2158 looks relevant, particularly this part: "This requirement is not sufficient if an implementation is free to select copy constructor when !is_nothrow_move_constructible::value &&

[Bug libstdc++/83981] vector::resize(size_type) should not require T to be CopyInsertable when std=c++14

2018-01-25 Thread daniel.kruegler at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83981 --- Comment #11 from Daniel Krügler --- (In reply to Jonathan Wakely from comment #10) > Perhaps Daniel can comment, since he wrote the resolution of lwg 2033. > > Daniel, if the intent was that vector::resize(size_type) must only move, > even

[Bug libstdc++/83981] vector::resize(size_type) should not require T to be CopyInsertable when std=c++14

2018-01-25 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83981 --- Comment #10 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #8) > I don't think your patch is correct. The whole point of the "move if > noexcept" utilities is that they handle this correctly. If the type is > nothrow

[Bug libstdc++/83981] vector::resize(size_type) should not require T to be CopyInsertable when std=c++14

2018-01-25 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83981 --- Comment #9 from Jonathan Wakely --- Also, if boost::optional had a noexcept move constructor it would work fine. This is a boost bug. The part of the patch addressing PR 83982 seems right.

[Bug libstdc++/83981] vector::resize(size_type) should not require T to be CopyInsertable when std=c++14

2018-01-25 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83981 --- Comment #8 from Jonathan Wakely --- I don't think your patch is correct. The whole point of the "move if noexcept" utilities is that they handle this correctly. If the type is nothrow movable, then move. Otherwise if it is copyable, then

[Bug libstdc++/83981] vector::resize(size_type) should not require T to be CopyInsertable when std=c++14

2018-01-25 Thread dtrebbien at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83981 --- Comment #7 from Daniel Trebbien --- So as not to break testsuite/23_containers/vector/capacity/resize/moveable2.cc for C++11, I decided that it would be best to keep the use of std::__uninitialized_move_if_noexcept_a() when compiling as

[Bug libstdc++/83981] vector::resize(size_type) should not require T to be CopyInsertable when std=c++14

2018-01-25 Thread dtrebbien at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83981 --- Comment #6 from Daniel Trebbien --- Created attachment 43243 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43243=edit Patch for PR 83981 and PR 83982

[Bug libstdc++/83981] vector::resize(size_type) should not require T to be CopyInsertable when std=c++14

2018-01-23 Thread dtrebbien at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83981 --- Comment #5 from Daniel Trebbien --- I have run into a small issue. C++11 apparently does not provide an exception guarantee on vector::resize(size_type), whereas in C++14, the exception guarantee is "If an exception is thrown other than by

[Bug libstdc++/83981] vector::resize(size_type) should not require T to be CopyInsertable when std=c++14

2018-01-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83981 --- Comment #4 from Jonathan Wakely --- That would be welcome.

[Bug libstdc++/83981] vector::resize(size_type) should not require T to be CopyInsertable when std=c++14

2018-01-23 Thread dtrebbien at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83981 --- Comment #3 from Daniel Trebbien --- I would like to make a patch for this and PR 83982 if that's okay.

[Bug libstdc++/83981] vector::resize(size_type) should not require T to be CopyInsertable when std=c++14

2018-01-22 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83981 --- Comment #2 from Jonathan Wakely --- https://wg21.link/lwg2033 changed the requirements.

[Bug libstdc++/83981] vector::resize(size_type) should not require T to be CopyInsertable when std=c++14

2018-01-22 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83981 Jonathan Wakely changed: What|Removed |Added Keywords||rejects-valid