[C++-sig] pyplusplus registration order - solution

Roman Yakovenko roman.yakovenko at gmail.com
Wed Feb 15 11:32:56 CET 2006


On 2/15/06, Hans Meine <meine at kogs1.informatik.uni-hamburg.de> wrote:
> On Wednesday 15 February 2006 07:30, Roman Yakovenko wrote:
> > 1. I think you are right. IMO this issue could not be elegantly
> > resolved without
> >    modification of boost.python.
> >
> >     Consider next case:
> >
> >     enum fruits{ other_apple, other_orange };
> >
> >     struct container{
> >         enum fruits{ apple, orange };
> >
> >         explicit container( fruits x = apple )
> >         {}
> >     };
>
> AFAIK, you can pass no_init to the exposer_t constructor and simply postpone
> the constructor definition until later (using init<>...).  Am I wrong?

:-), Tell me the true do you think that this is an elegant solution?

By the way I tested it and it works. I will implement it.

Thanks for the tip

--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/



More information about the Cplusplus-sig mailing list