Re: [C++-sig] Enums with duplicated values.

2009-02-10 Thread Hugo Lima
David, any comments about the patch? On Tue, Feb 3, 2009 at 3:55 PM, Hugo Lima wrote: > On Fri, Dec 19, 2008 at 12:13 AM, David Abrahams wrote: >> >> on Wed Dec 17 2008, "Hugo Lima" wrote: >> >>> Hi; >>> >>> I need wrap enums with duplicated values, but boost::python do not >>> support it. At t

Re: [C++-sig] Enums with duplicated values.

2009-02-10 Thread David Abrahams
on Tue Feb 10 2009, Hugo Lima wrote: > David, any comments about the patch? Please attach the patch to a Trac ticket and I'll have a look. -- Dave Abrahams BoostPro Computing http://www.boostpro.com ___ Cplusplus-sig mailing list Cplusplus-sig@pytho

Re: [C++-sig] Enums with duplicated values.

2009-02-10 Thread Hugo Lima
On Tue, Feb 10, 2009 at 2:34 PM, David Abrahams wrote: > > on Tue Feb 10 2009, Hugo Lima wrote: > >> David, any comments about the patch? > > Please attach the patch to a Trac ticket and I'll have a look. Ok, https://svn.boost.org/trac/boost/ticket/2744 > -- > Dave Abrahams > BoostPro Computing

[C++-sig] using function objects as getters/setters for the properties

2009-02-10 Thread Gennadiy Rozental
Hi, I need to implement some translation in a getter and setter for particular field. I am getting compile time errors, I am not sure how to fix. I am using 1.33.1. Here is what I do: template struct Getter { explicit Getter( MyClass T::* mem ) : m_member( mem ) {} bp::object operat

Re: [C++-sig] using function objects as getters/setters for the properties

2009-02-10 Thread David Abrahams
on Tue Feb 10 2009, Gennadiy Rozental wrote: > Hi, > > I need to implement some translation in a getter and setter for particular > field. > > I am getting compile time errors, I am not sure how to fix. I am using 1.33.1. > > Here is what I do: > > template > struct Getter { > explicit Get

Re: [C++-sig] using function objects as getters/setters for the properties

2009-02-10 Thread Gennadiy Rozental
David Abrahams boostpro.com> writes: > Frankly I'm not sure it's possible to use a function object in that way. > Have you tried simply using the data member pointer without the wrapper? > > bp::class_< MyClass >( "MyClass", bp::no_init ) > .add_property( "field", &MyClass::field )