I can do this:
Code:
std::vector<Foo> vcfoo;
for ( const auto& n : vcfoo ) {
n.print();
}
If the for-loop is in the member function of a class derived from the container class, how to do so?
Code:
class VecFoo : public std::vector<Foo>
{
void print() const {
for ( const auto& n : ??? ) { // *this ? ugly
n.print();
}
}
};
Thanks in advance.