Implement LWG 2451, optional<T> should 'forward' T's implicit conversions.
authorVille Voutilainen <ville.voutilainen@gmail.com>
Wed, 6 Jul 2016 13:26:10 +0000 (16:26 +0300)
committerVille Voutilainen <ville@gcc.gnu.org>
Wed, 6 Jul 2016 13:26:10 +0000 (16:26 +0300)
commit6ffe854859e61fd04e1db8694e2c519f4010647b
tree957dd6c8746ccbf44024331b3ac6724659ec9dbe
parente4bbb037670323fbc578b6bc68cfb5252f1bf0cc
Implement LWG 2451, optional<T> should 'forward' T's implicit conversions.

Implement LWG 2451, optional<T> should 'forward' T's
implicit conversions.
* include/experimental/optional (__is_optional_impl, __is_optional):
New.
(optional()): Make constexpr and default.
(optional(_Up&&), optional(const optional<_Up>&),
optional(optional<_Up>&& __t): New.
(operator=(_Up&&)): Constrain.
(operator=(const optional<_Up>&), operator=(optional<_Up>&&)): New.
* testsuite/experimental/optional/cons/value.cc:
Add tests for the functionality added by LWG 2451.
* testsuite/experimental/optional/cons/value_neg.cc: New.

From-SVN: r238049
libstdc++-v3/ChangeLog
libstdc++-v3/include/experimental/optional
libstdc++-v3/testsuite/experimental/optional/cons/value.cc
libstdc++-v3/testsuite/experimental/optional/cons/value_neg.cc [new file with mode: 0644]