[C++-sig] Re: make_constructor issues
dave at boost-consulting.com
Mon Jul 26 16:55:11 CEST 2004
Stefan Seefeld <seefeld at sympatico.ca> writes:
> David Abrahams wrote:
>>>But copy-construct it must anyways, simply because I chose to export
>>>the type as class_<Foo>, not class_<Foo, shared_ptr<Foo> > !?!
>> No; there's no copy construction.
> My understanding of 'class_<Foo>' is that a python type is generated
> with an embedded 'Foo' in it.
That's just the _default_ structure of a Python Foo object generated
by ordinary __init__ functions. The ones generated by
make_constructor __init__ functions hold the [smart] pointer.
> If I have a function returning a Foo (value, pointer, reference,
> whatever), which can act as a constructor for a python object
> holding a Foo, how can I construct my python instance without either
> copy construction or assignment ?
> Thanks for any clarifications,
More information about the Cplusplus-sig