Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2001-03-17 08:27:20


FWIW, you can do this without C++ overloads:

void foo(int x = 0, int y = 1) {....} // original function
void foo1(int x) { foo(x); }
void foo0() { foo(); }

...
my_module.def(foo, "foo");
my_module.def(foo1, "foo");
my_module.def(foo0, "foo");

Sorry, I know it's verbose :(

----- Original Message -----
From: "Eric van Riet Paap" <eric_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Friday, March 16, 2001 4:59 AM
Subject: Re: [boost] boost.python default parameters

> Hi,
>
> The thing is: I was really happy with boost.python, I never really liked
> swig because in my hands it
> never was a stable product. However after a lot of time it did what I
> wanted. And now I use boost.python,
> and my C++ - Python interface code is under my control again, which I
prefer
> a lot over the "magic" swig does.
> So far these default parameter stuff is the only thing I used with swig
but
> can't do with boost.python
> the way I would like to. It's not a major feature, and because I am very
new
> to boost.python, I don't
> know if other (missing) features are perhaps a lot more important to
> implement first.
> It could also be that everyone here has seen boost.python grow into what
it
> is now
> and is very happy with it! I can imagine that!
>
> Anyway, great piece of software, very useful for me.
>
> Eric
>
> ----- Original Message -----
> From: "David Abrahams" <abrahams_at_[hidden]>
> To: <boost_at_[hidden]>
> Sent: Saturday, March 17, 2001 2:00 AM
> Subject: Re: [boost] boost.python default parameters
>
>
> > It's not a high priority for me yet. Ralf or Ullrich may feel
differently,
> > however.
> > -Dave
> >
> > ----- Original Message -----
> > From: "Eric van Riet Paap" <eric_at_[hidden]>
> > To: "Boost Mailinglist" <boost_at_[hidden]>
> > Sent: Friday, March 16, 2001 10:55 AM
> > Subject: [boost] boost.python default parameters
> >
> >
> > Hi,
> >
> > I read somewhere that C++ default parameters are not (yet) supported by
> > boost.python .
> > Unfortunately I worked with swig before boost and use this feature
often.
> > I know I can make overloaded functions, but don't feel to happy about
> that.
> > Is this feature on the wishlist of the authors of boost.python? If so,
> when
> > can we expect it?
> >
> > kind regards,
> > Eric
> >
> >
> >
> >
> > List-Unsubscribe: <mailto:boost-unsubscribe_at_[hidden]>
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >
> >
>
>
> List-Unsubscribe: <mailto:boost-unsubscribe_at_[hidden]>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk