Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

C++0x move semantics (rvalue references)

yaaang
Beginner
469 Views

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;
}

0 Kudos
1 Reply
RafSchietekat
Valued Contributor III
469 Views
Is there any reason why you couldn't use something like boost::shared_ptr?
0 Kudos
Reply