[C++-sig] Multiple Constructors
troy d. straszheim
troy at resophonic.com
Mon Aug 18 17:14:30 CEST 2008
Bilokon, Paul wrote:
> I'm wondering if there is an example that demonstrates how one should
> deal with classes with multiple constructors with different signatures,
There is. It is right in the docs.
> scope in_Term = class_<Term>("Term", init<>())
> .def(init<const Term::Foo, Bar>())
> .def(init<const Term::Foo, Bar, bool>())
> .def(init<const std::string &>())
> I don't think this approach is valid.
You're going to have to be more specific than that.
More information about the Cplusplus-sig