Hi,
I know this questions has come up in various guises before, but this is slightly different.
I have a class which contains a std::map. Although I wish to use the map for other purposes inside the class, externally I want to expose an iterator adapter to just the values inside the map (ie the second item in the std::pair).
For example in python I might do something like this:
def __iter__(self):
return self._dict.itervalues()
How do I go about doing this in c++, hiding the implementation inside the class?
Thanks,
Dan