[Bug libstdc++/83982] Exception guarantee of C++14 vector::resize(size_type) is not met

2018-02-15 Thread dtrebbien at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83982 --- Comment #5 from Daniel Trebbien --- Ah! Thank you for letting me know.

[Bug libstdc++/83982] Exception guarantee of C++14 vector::resize(size_type) is not met

2018-02-15 Thread dtrebbien at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83982 --- Comment #3 from Daniel Trebbien --- Friendly reminder: I have attached a patch for this issue which I would like to have reviewed and committed.

[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++/83982] Exception guarantee of C++14 vector::resize(size_type) is not met

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

[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 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 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++/83982] New: Exception guarantee of C++14 vector::resize(size_type) is not met

2018-01-22 Thread dtrebbien at gmail dot com
Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: dtrebbien at gmail dot com Target Milestone: --- In [vector.capacity], C++14 mentions for `void resize(size_type sz)': "Remarks: If an exception is thrown other than by the

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

2018-01-22 Thread dtrebbien at gmail dot com
Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: dtrebbien at gmail dot com Target Milestone: --- In C++14, the requirements of vector::resize(size_type) changed. Whereas C++11 requires T to be CopyInsertable, C