C++0x move semantics (rvalue references)

C++0x move semantics (rvalue references)

Hi, I'm interested in using e.g. tbb::concurrent_queue with std::unique_ptr. However, the following doesn't work; I get a compile error with gcc 4.3.2 trying to use the copy ctor which is private, instead of the move ctor. When will TBB support C++0x? (The unique_ptr code can be found here.)

#include
#include
using namespace std;
using namespace tbb;
int main() {
concurrent_queue > q;
return 0;
}

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Is there any reason why you couldn't use something like boost::shared_ptr?

Leave a Comment

Please sign in to add a comment. Not a member? Join today