c++ - Iterate shared_ptr<std::vector<T>> -


let's assume have following:

auto vec = std::shared_ptr<std::vector<t>> 

and want loop through vec entities using c++11 range-based loop.

the following works:

for (auto entity: *vec) 

my question there anyway same without using * operator?

no. sensible way dereference pointer dereference operator.


Comments

Popular posts from this blog

java - How to Configure JAXRS and Spring With Annotations -

visual studio - TFS will not accept changes I've made to a Java project -

php - Create image in codeigniter on the fly -