Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2001-04-11 07:49:39


----- Original Message -----
From: "Jacek Generowicz" <jmg_at_[hidden]>

> Thanks, it works.
>
> Now, how do I deal with overloaded constructors? . . . or overloaded
> functions in general (I guess I could just give these different
> names, but with constructors you don't have choice in name . . . or
> should I wrap them in some make_class structure ?)

Have you read http://www.boost.org/libs/python/doc/overloading.html?
Do you have questions about it?

> > You could even write a function template to do it so you don't have
> > to repeat the code. ;-)
>
> Hmm, this looks to me as if it could be more trouble than it's worth,
> as I would somehow need to get template argument information into the
> second (string) argument of the python::class_builder<> constructor.
> Is there a neat way of dealing with this ? (Maybe some trait trick, or
> a template specialization . . . nothing truly simple comes to mind).

How about just passing that string as a parameter to the function template?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk