[C++-sig] Multiple Constructors
paul.bilokon at lehman.com
Mon Aug 18 17:43:41 CEST 2008
My apologies, thanks a lot for pointing this out.
From: c++-sig-bounces at python.org [mailto:c++-sig-bounces at python.org] On
Behalf Of troy d. straszheim
Sent: Monday, August 18, 2008 4:15 PM
To: Development of Python/C++ integration
Subject: Re: [C++-sig] Multiple Constructors
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, e.g.
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.
C++-sig mailing list
C++-sig at python.org
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice.
More information about the Cplusplus-sig