[C++-sig] Re: iter(std::map<K*,V>)
David Abrahams
dave at boost-consulting.com
Wed Jun 18 22:02:45 CEST 2003
"Mike Rovner" <mike at bindkey.com> writes:
>
> My code:
>
> namespace boost { namespace python {
> struct copy_map_key_ptr
> {
> template <class T>
> struct apply
> {
> typedef Map::value_type result_converter;
> struct type
> {
> bool convertible() const {return true;}
> PyObject* operator()(Map::value_type p) const
> { return incref(object(ptr(p.first)).ptr()); }
> typedef PyObject* result_type;
> };
> };
> };
> }}
Does it work?
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
More information about the Cplusplus-sig
mailing list