
4 Oct
2012
4 Oct
'12
9:30 a.m.
2012/10/4 Adi Shavit
Hi,
How can I [boost::]move() veryLongString into the boost::thread ctor (probably using via boost::bind)? Is this possible?
Hi, Adi sorry, bind() can only do as much also - either doing a copy of a std::string or using a reference to it. As you mentioned, you have to use shared_ptr<> to pass ownership or use boost::container::string which is movable (even in 03 compilers via boost.move emulation) instead of std::string. Cheers, Szymon