Implement LWG 2744 and LWG 2754.
authorVille Voutilainen <ville.voutilainen@gmail.com>
Mon, 15 Aug 2016 15:06:09 +0000 (18:06 +0300)
committerVille Voutilainen <ville@gcc.gnu.org>
Mon, 15 Aug 2016 15:06:09 +0000 (18:06 +0300)
commit5c578ae4348bddb97991348c2d0a05e3e7d7ad5a
treeda46540d961190d68c5cffdb9214cf0013f267ab
parent7e1dde14c9485b7700498fa1f37109f647d3907e
Implement LWG 2744 and LWG 2754.

* include/std/any (any(ValueType&&)): Constrain with __is_in_place_type.
(any(in_place_type_t<_ValueType>, _Args&&...)): Use _Decay.
(any(in_place_type_t<_ValueType>, initializer_list<_Up>, _Args&&...)):
Likewise.
(emplace(_Args&&...)): Likewise.
(emplace(initializer_list<_Up>, _Args&&...)): Likewise.
* include/std/utility: (__is_in_place_type_impl): New.
(__is_in_place_type): Likewise.
* testsuite/20_util/any/assign/emplace.cc: Add tests for decaying
emplace.
* testsuite/20_util/any/cons/in_place.cc: Add tests for decaying
in_place constructor.
* testsuite/20_util/any/misc/any_cast_neg.cc: Adjust.
* testsuite/20_util/any/requirements.cc: Add a test for
in_place-constructing a non-default-constructible type.

From-SVN: r239482
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/any
libstdc++-v3/include/std/utility
libstdc++-v3/testsuite/20_util/any/assign/emplace.cc
libstdc++-v3/testsuite/20_util/any/cons/in_place.cc
libstdc++-v3/testsuite/20_util/any/misc/any_cast_neg.cc
libstdc++-v3/testsuite/20_util/any/requirements.cc