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 - JavaFX 2 slider labelFormatter not being used -

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -