Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

C++0x move semantics (rvalue references)

yaaang
Beginner
132 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
Black Belt
132 Views
Is there any reason why you couldn't use something like boost::shared_ptr?
Reply