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

how can I get the interal pointer of first element in concurrent_vector?

steve3
Beginner
110 Views
I have a class inherited from concurrent_vector, of course the function at and [] can get the reference, but I want to create a function Type* get() to get the first element's address.

How can I do this? I've made some try, but the compiler always generate thsee warning:

tbb/concurrent_vector.h(889): warning C4345: behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized

0 Kudos
1 Reply
Dmitry_Vyukov
Valued Contributor I
110 Views
concurrent_vector does not lie in memory sequentially, so pointer to a first element is not as useful as one may think.
Reply