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
Post a Comment