Implement LWG 2900, The copy and move constructors of optional are not constexpr.
authorVille Voutilainen <ville.voutilainen@gmail.com>
Tue, 28 Mar 2017 23:05:21 +0000 (02:05 +0300)
committerVille Voutilainen <ville@gcc.gnu.org>
Tue, 28 Mar 2017 23:05:21 +0000 (02:05 +0300)
commit250f5b6cc1bf4635d8c7c31fe39ee7e1a982ef07
tree073219861618d399794f44ab4ecea6a000ec33b7
parent19846619223e78409e3788b5b627bfe26684604f
Implement LWG 2900, The copy and move constructors of optional are not constexpr.

Implement LWG 2900, The copy and move constructors
of optional are not constexpr.
* include/std/optional (_Optional_payload): New.
(_Optional_base): Remove the bool parameter.
(_Optional_base<_Tp, false>): Remove.
(_Optional_base()): Adjust.
(_Optional_base(nullopt_t)): Likewise.
(_Optional_base(in_place_t, _Args&&...)): Likewise.
(_Optional_base(in_place_t, initializer_list<_Up>, _Args&&...)):
Likewise.
(_Optional_base(const _Optional_base&)): Likewise.
(_Optional_base(_Optional_base&&)): Likewise.
(operator=(const _Optional_base&)): Likewise.
(operator=(_Optional_base&&)): Likewise.
(~_Optional_base()): Remove.
(_M_is_engaged()): Adjust.
(_M_get()): Likewise.
(_M_construct(_Args&&...)): Likewise.
(_M_destruct()): Likewise.
(_M_reset()): Likewise.
(_Optional_base::_Empty_byte): Remove.
(_Optional_base::_M_empty): Remove.
(_Optional_base::_M_payload): Adjust.
* testsuite/20_util/optional/cons/value_neg.cc: Adjust.
* testsuite/20_util/optional/constexpr/cons/value.cc: Add tests.

From-SVN: r246556
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/optional
libstdc++-v3/testsuite/20_util/optional/cons/value_neg.cc
libstdc++-v3/testsuite/20_util/optional/constexpr/cons/value.cc