PR libstdc++/85642 fix is_nothrow_default_constructible<optional<T>>
authorJonathan Wakely <jwakely@redhat.com>
Fri, 4 May 2018 08:57:23 +0000 (09:57 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 4 May 2018 08:57:23 +0000 (09:57 +0100)
commitd6ed6b074f71f423e0ffc7307228a98d0d194b8a
tree689c9c3719d6f59a6de9e358558411f7b5459b07
parent39bc9f83fece7a16836cb5b4869fe66b66a373a7
PR libstdc++/85642 fix is_nothrow_default_constructible<optional<T>>

Add missing noexcept keyword to default constructor of each
_Optional_payload specialization.

PR libstdc++/85642 fix is_nothrow_default_constructible<optional<T>>
* include/std/optional (_Optional_payload): Add noexcept to default
constructor. Re-indent.
(_Optional_payload<_Tp, true, true, true>): Likewise. Add noexcept to
constructor for copying disengaged payloads.
(_Optional_payload<_Tp, true, false, true>): Likewise.
(_Optional_payload<_Tp, true, true, false>): Likewise.
(_Optional_payload<_Tp, true, false, false>): Likewise.
* testsuite/20_util/optional/cons/85642.cc: New.
* testsuite/20_util/optional/cons/value_neg.cc: Adjust dg-error lines.

From-SVN: r259928
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/optional
libstdc++-v3/testsuite/20_util/optional/cons/85642.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/optional/cons/value_neg.cc