[C++-sig] bp::arg() also requires types to be declared

Roman Yakovenko roman.yakovenko at gmail.com
Fri Jun 23 20:04:31 CEST 2006

On 6/23/06, Hans Meine <hans_meine at gmx.net> wrote:
> On Wednesday 21 June 2006 18:01, Niall Douglas wrote:
> > If, and only if, both Foo and Foo2 have constructors with no default
> > args, you can delay the constructor declaration and declare it later
> > via bp::init<>. Otherwise you are trapped and can't use bp::arg() at
> > all.
> That's not the whole truth.  AFAICS, you can use no_init to delay constructor
> declaration in any case, create all class_<...> instantiations and then later
> add the methods.  Maybe that helps?

Thanks for idea. I am aware of this work around. Boost.Python contains
that helps to use such approach - def_visitor.
I can change pyplusplus to generate code, that implements this idea.
But right now it is too much work, that should be done + generated
code will be less readable
( IMHO ).

Roman Yakovenko
C++ Python language binding

More information about the Cplusplus-sig mailing list