$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] Moving an std::string into a boost::thread in C++03
From: Adi Shavit (adishavit_at_[hidden])
Date: 2012-10-04 06:39:42
Hi Kris,
Since I don't have C++11, I don't have auto but I tried this and it works.
I guess I was hoping for a more (meta-)magical solution that allows bind to
automatically create a move-copy or something...
Thanks!
Adi
> auto p = make_shared<string>();
> p->swap( veryLongString );
> And now you have a shared pointer with moved contents of veryLongString
> ;-)
> Regards,
> Kris
>
>