Community
cancel
Showing results for 
Search instead for 
Did you mean: 
steve3
Beginner
45 Views

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

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
45 Views

concurrent_vector does not lie in memory sequentially, so pointer to a first element is not as useful as one may think.
Reply