[C++-sig] Overloading & keyword args bug?

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Thu Jun 8 19:26:24 CEST 2006


--- Alex Mohr <amohr at pixar.com> wrote:

> > I am surprised any of your tests works.
> > AFAIK you need to make several changes:
> > 
> > BOOST_PYTHON_FUNCTION_OVERLOADS(f1_overloads, f1, 1, 3)
> > BOOST_PYTHON_FUNCTION_OVERLOADS(f2_overloads, f2, 2, 4)
> > 
> > you have to give your C++ functions default arguments.
> 
> Why is this?  Suppose I don't want the functions to have default args in 
> C++ -- only in python.

I'd simply write a thin C++ wrapper which supplies the default arguments.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Cplusplus-sig mailing list