[C++-sig] Wrap class without a default constructor
Min Xu
minxu at sci.ccny.cuny.edu
Fri Sep 6 05:15:00 CEST 2002
It used to work to wrap a class which does define a default constructor in v2
and it does not work any more from the current CVS version. What's right way
now? Thanks.
--- snip ---
python::class_<geometry >("geometry")
.def_init(args<const grid*>()
// Keep the grid alive as long as the geometry is.
, python::with_custodian_and_ward<1,2>())
.def_init(args<double, double, const grid*>())
.def_init(args<double, const grid*, geometryType>());
geometry does have a default constructor.
---snip ---
Min Xu
More information about the Cplusplus-sig
mailing list