[C++-sig] Wrap class without a default constructor

Min Xu minxu at sci.ccny.cuny.edu
Fri Sep 6 16:24:06 CEST 2002


It works now. Thanks.

What is the relation between this no_init and boost::noncopyable? Can the 
boost::noncopyable be omitted if a) no_init is used b) no other def_init is 
defined for a class?

Min Xu

On Thursday 05 September 2002 23:28, David Abrahams wrote:
> See http://mail.python.org/pipermail/c++-sig/2002-August/001928.html
>
> HTH,
> Dave
>
> -----------------------------------------------------------
>            David Abrahams * Boost Consulting
> dave at boost-consulting.com * http://www.boost-consulting.com
>
>
> ----- Original Message -----
> From: "Min Xu" <minxu at sci.ccny.cuny.edu>
> To: <c++-sig at python.org>
> Sent: Thursday, September 05, 2002 11:15 PM
> Subject: [C++-sig] Wrap class without a default constructor
>
>
> 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
>
> _______________________________________________
> C++-sig mailing list
> C++-sig at python.org
> http://mail.python.org/mailman/listinfo/c++-sig
>
>
> _______________________________________________
> C++-sig mailing list
> C++-sig at python.org
> http://mail.python.org/mailman/listinfo/c++-sig




More information about the Cplusplus-sig mailing list