From: Jacek Generowicz (jmg_at_[hidden])
Date: 2001-04-11 03:02:17
David Abrahams wrote:
> You just need to expose each instantiation as an ordinary class.
> In fact, you can do this:
> typedef my_template<double> my_template_double;
> typedef my_template<std::complex<double> > my_template_complex_double;
> Now expose my_template_double and my_template_complex_double as though they
> were ordinary classes.
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 ?)
> 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).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk