re PR libstdc++/77288 (Std::experimental::optional::operator= implementation is broke...
authorVille Voutilainen <ville.voutilainen@gmail.com>
Wed, 21 Sep 2016 17:37:17 +0000 (20:37 +0300)
committerVille Voutilainen <ville@gcc.gnu.org>
Wed, 21 Sep 2016 17:37:17 +0000 (20:37 +0300)
commitb641f833bac3fe7e57f98f68f645aa63eb614d0a
treeae2d2b476ed53a16d1938ed6aacf96d09b73395d
parent557867852474743abd1e6b2ca678af8a8cf18b51
re PR libstdc++/77288 (Std::experimental::optional::operator= implementation is broken in gcc 6.1)

PR libstdc++/77288
* include/std/optional (__is_optional_impl, __is_optional): Remove.
(__converts_from_optional, __assigns_from_optional): New.
(optional(_Up&&)): Use is_same instead of __is_optional.
(optional(const optional<_Up>&)): Constrain with
__converts_from_optional.
(optional(optional<_Up>&&)): Likewise.
(operator=(_Up&&)): Use is_same instead of __is_optional, check
is_same and is_scalar.
(operator=(const optional<_Up>&)): Constrain with
__converts_from_optional and __assigns_from_optional.
(operator=(optional<_Up>&&)): Likewise.
* testsuite/20_util/optional/77288.cc: New.
* testsuite/20_util/optional/cons/value.cc: Adjust.

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