End Google Ads 201810 - BS.net 01 --> I have a function which return an std::vector
it is quite big and moved around a lot and kept for a long time, so I put it into a
std::shared_ptr

Now I need to access the vector as an array
with
std::vector a;
I can write
T* pa = &a[0];

But this doesn't work with a std::shared_ptr

What can I do?

Remark
Why don't I just pass it by reference around?
Well, it is created in a function, and then it is captured by a lambda that is spawn regularly into a task (i.e. in another thread) which would be the only reference left.
And I want to avoid copying the vector (it is big) and destructing when it goes out of scope, I want to create it only once and reuse it / keep it alive!...
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.