[C++-sig] Re: Re: map key

Mike Rovner mike at bindkey.com
Mon Jan 20 21:46:15 CET 2003

"David Abrahams" <dave at boost-consulting.com> wrote in message
news:uadhzfgpd.fsf at boost-consulting.com...
> David Abrahams <dave at boost-consulting.com> writes:
> > I think it doesn't know about std::pair<const Key*,Value>, which is
> > the iterator's value type ;-)

Of cause, you are right!

> > A Python map's iterator just iterates the keys, so you might need to
> > build the iterator by hand if you want it to do the same thing.
> You could use the Boost transform iterator adaptor with std::select1st
> to build an iterator over keys and expose it with class_<...>.range().

I decided to leave them out. I already have keys(), values() and items(),
so I can live without iter...().

More information about the Cplusplus-sig mailing list