PR libstdc++/85642 fix is_nothrow_default_constructible<optional<T>>
commit5fef6f2fd866c7cecc4b9fd7c84e43adc19a314a
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 4 May 2018 08:57:23 +0000 (4 08:57 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 4 May 2018 08:57:23 +0000 (4 08:57 +0000)
tree689c9c3719d6f59a6de9e358558411f7b5459b07
parent2b895374579f2605c8f9fe200b31e3728cb0fcd8
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@259928 138bc75d-0d04-0410-961f-82ee72b054a4
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