Boost logo

Boost :

Subject: Re: [boost] [Review] Formal Review: Boost.Move
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2010-05-26 07:46:52


The following doesn't compiles.
void fct(BOOST_RVALUE_REF(movable_only) mo, int x){...}
movable_only m;
boost::function<void()> f_one = boost::bind(&fct, boost::move(m), 1);

Im not sure if the following is correct,
boost::function<void()> f_one = boost::bind(&fct, boost::ref(boost::move(m)), 1);

What is the correct way to use move semantics with Boost.Bind? Do we need some Boost.Bind adaptations?


P.S. The same question is valid for boost::lambda and boost::phoenix.

Boost list run by bdawes at, gregod at, cpdaniel at, john at