
20 Dec
2011
20 Dec
'11
7:14 p.m.
If the elements of a multi_index_container are std::unique_ptr, it doesn't seem to work because the assignment operator of std::unique_ptr is private. Any way to let it work? If I change unique_ptr to shared_ptr, it works. But I need a good performance. Or is there anyway to work around to get pointer container performance with multi index power?
Why do you think it would affect your program performance? Have you run profiler, or it's just a guess? I use MIC with shared_ptr a lot and it never was a bottleneck.