Iterate shared_ptr
Let's assume I have the following:
auto vec = std::shared_ptr<std::vector<T>>
And I want to loop through all the vec entities using C++11 Range-Based
for Loop.
The following works:
for (auto entity: *vec)
my question is there anyway to do the same without using the * operator?
No comments:
Post a Comment