[C++-sig] Dissimilar Overloads
Leonard Dick
leo4ever22 at yahoo.com
Wed Dec 4 20:50:43 CET 2002
Hi,
thanx a lot for your mail, could you please break
down you intepretations and languages more simpler, I
couldn't figure out much from you mail.
thanks
Leo
--- "Scott A. Smith" <ssmith at magnet.fsu.edu> wrote:
> Hi,
>
> If one has overloaded functions with dis-similar
> arguments,
> do they need to be wrapped separately? While I have
> been able
> to successfully use BOOST_PYTHON_FUNCTION_OVERLOADS
> and
> BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS when my
> functions have
> argument lists that are similar and/or use default
> values, I cannot
> figure out how to do something equally simple to get
> functions with
> different types of arguments exported. For example,
> is there something
> like the code below that can work?
>
> #include <boost/python/def.hpp>
> using namespace boost::python;
>
> int f(int x, int y, int z);
> void f(double d, complex z);
>
> BOOST_PYTHON_MODULE(xxx)
> {
> def("f", f, args("x", "y", "z"));
> def("f", f, args("d", "y"));
> }
>
> Or do I have to define new functions with different
> names
> then export them?
>
> Thanks,
> Scott
>
>
> _______________________________________________
> C++-sig mailing list
> C++-sig at python.org
> http://mail.python.org/mailman/listinfo/c++-sig
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
More information about the Cplusplus-sig
mailing list