Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-01-30 15:46:38

----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>

> From: "Yitzhak Sapir" <ysapir_at_[hidden]>
> > What I meant was, could boost::bind(some_stl_func, _1, _2) be used to
> > create a fwding function?
> No, because bind cannot access the defaults for some_stl_func. Of course
> can supply the defaults yourself but then you are back to nonportability
> land.

The idea would be to supply lambda expressions which can be evaluated to
supply the optional defaults.

> I don't know whether this is a practical issue. Has anyone encountered a
> standard library function with such a signature?

It's a practical issue in general. At least, in Boost.Python people often
want to wrap C++ functions (essentially a binding problem) which have
default arguments. Manually creating forwarding functions is quite tedious
and I intend to find some way to help people avoid it.


Boost list run by bdawes at, gregod at, cpdaniel at, john at