Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Are call wrappers move-enabled?

1 view
Skip to first unread message

Scott Meyers

unread,
Nov 17, 2009, 11:27:50 AM11/17/09
to
[func.require]/4 (20.7.2/4 in N3000) says that call wrappers (such as are
returned from std::bind) must be copy constructible, but it says nothing about
such wrappers being movable. Does this mean that in

auto f = std::bind( /* blah, blah, blah */ );

I should expect f to be copy constructed from the object returned by bind?

Thanks,

Scott

--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std...@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]

Daniel Krügler

unread,
Nov 17, 2009, 2:29:11 PM11/17/09
to
On 17 Nov., 17:27, Scott Meyers <use...@aristeia.com> wrote:
> [func.require]/4 (20.7.2/4 in N3000) says that call wrappers (such as are
> returned from std::bind) must be copy constructible, but it says nothing about
> such wrappers being movable. Does this mean that in
>
> auto f = std::bind( /* blah, blah, blah */ );
>
> I should expect f to be copy constructed from the object returned by bind?

No, the result should be movable. Note that this LWG issue:

http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#817

HTH & Geetings from Bremen,

Daniel Kr�gler

0 new messages