Hello,
I have a class called ByteSink that has a move constructor and move
assignment operator. I pass an object of type ByteSink into bood::bind()
by-value and it fails to compile. First, here is my call to boost::bind():
void SerialClient::Write( ByteSink data )
{
m_service.post( boost::bind( &SerialClient::DoWrite, this, data ) );
}
The error message I'm getting will be located at the very bottom of this
message to prevent clutter. Note that I am compiling on MSVC9 under Windows.
Below is what my move constructor/assignment function prototypes look like
for ByteSink:
/// Uses move semantics.
ByteSink( ByteSink& other );
/// Uses move semantics.
ByteSink& operator= ( ByteSink& other );
And the compiler error I'm getting (It's a bit lengthy) is below. Any idea
what is causing this? My best guess is that boost::bind() is using const
somewhere, and it cannot find a copy constructor that takes a const ByteSink
as a parameter, since I'm not using a typical copy constructor.
1>C:\IT\third_party\boost_1_40_0_beta1\boost/bind/bind.hpp(859) : error
C2558: class 'boost::_bi::list2