Implement LWG 2769, Redundant const in the return type of
commit83954fa1ac92bcce792c9b2829c648282b98e8de
authorville <ville@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 16 Dec 2016 11:34:45 +0000 (16 11:34 +0000)
committerville <ville@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 16 Dec 2016 11:34:45 +0000 (16 11:34 +0000)
tree7b9f82a4f8271aa9bbfad13dac55d30a9f1d1557
parent3dae587b3725acf5f36e6952810a84fa817702cc
Implement LWG 2769, Redundant const in the return type of
any_cast(const any&).
* include/std/any (_AnyCast): New.
(any_cast(const any&)): Use it and add an explicit cast for return.
(any_cast(any&)): Likewise.
(any_cast(any&&)): Likewise.
* testsuite/20_util/any/misc/any_cast.cc: Add a test for a type
that has an explicit copy constructor.
*testsuite/20_util/any/misc/any_cast_neg.cc: Adjust.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@243739 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/any
libstdc++-v3/testsuite/20_util/any/misc/any_cast.cc
libstdc++-v3/testsuite/20_util/any/misc/any_cast_neg.cc