[C++-sig] Re: Re: Re: sub module support in V2

David Abrahams david.abrahams at rcn.com
Wed Jun 12 03:30:59 CEST 2002


----- Original Message -----
From: "Dave Hawkes" <daveh at cadlink.com>


> "David Abrahams" <david.abrahams at rcn.com> wrote in message
> news:004f01c2119d$e4c9e710$6501a8c0 at boostconsulting.com...
> >
> > From: "Dave Hawkes" <daveh at cadlink.com>
> >
> > > ie
> > >
> > >     class_(class_<...>& c);
> > >
> > > Of course this will look like a duck, walk like a duck and bark like
a
> > > dog...
> >
> > Why?
> > It doesn't match the regular copy-constructor, if that's what you're
> > worried about.
> >
> > > This probably means putting in some superfluous argument so it
doesn't
> > look
> > > like a copy constrctor.
> >
> > Are you just concerned that people will be confused?
>
> Primarily, yes, as it superficially looks like it could be used to copy
> class_ instances, but that is not its function.

In that case, to reduce confusion, have it accept boost::python::object,
which will be a base of class_<>.

-Dave






More information about the Cplusplus-sig mailing list