any (any::operator=(const any&)): Move check for self-assignment.
authorJonathan Wakely <jwakely@redhat.com>
Fri, 14 Aug 2015 11:51:18 +0000 (12:51 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 14 Aug 2015 11:51:18 +0000 (12:51 +0100)
commit2548a4d6ba4d54393ae7947a7a8c9070d9c7e113
tree632465c942818a2b37b76a4879f691df51e00467
parent357c9f7edc4154418f9862652b53fa8321e91d22
any (any::operator=(const any&)): Move check for self-assignment.

* include/experimental/any (any::operator=(const any&)): Move check
for self-assignment.
(any::operator=(any&&)): Add check for self-assignment.
(any::operator=(_ValueType&&)): Constrain template argument.
(any::swap(any&)): Add check for self-swap.
* testsuite/experimental/any/assign/self.cc: Test move and swap.
* testsuite/experimental/any/misc/any_cast_neg.cc: Update dg-error.

From-SVN: r226894
libstdc++-v3/ChangeLog
libstdc++-v3/include/experimental/any
libstdc++-v3/testsuite/experimental/any/assign/self.cc
libstdc++-v3/testsuite/experimental/any/misc/any_cast_neg.cc