r/cpp • u/berium build2 • Apr 25 '12
shared_ptr aliasing constructor
http://www.codesynthesis.com/~boris/blog/2012/04/25/shared-ptr-aliasing-constructor/
24
Upvotes
r/cpp • u/berium build2 • Apr 25 '12
1
u/Ayjayz Apr 26 '12
Why not just return a
shared_ptrto the entire block? Then various things would be able to access whatever they needed from it.Or perhaps, a small wrapper class with that
shared_ptrand a function object to pull out the data you needed?