This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
superfluous constructor ?
- From: Serge Pavlovsky <pal666 at gmail dot com>
- To: libstdc++ at gcc dot gnu dot org
- Date: Sun, 26 Feb 2012 05:21:19 +0200
- Subject: superfluous constructor ?
- Authentication-results: mr.google.com; spf=pass (google.com: domain of pal666@gmail.com designates 10.204.128.132 as permitted sender) smtp.mail=pal666@gmail.com; dkim=pass header.i=pal666@gmail.com
hi
in <functional>
function&
operator=(function&& __x)
{
function(std::move(__x)).swap(*this);
return *this;
}
why not just __x.swap(*this); ?