Boost logo

Boost :

From: Yitzhak Sapir (ysapir_at_[hidden])
Date: 2002-01-30 15:31:08


What I meant was, could boost::bind(some_stl_func, _1, _2) be used to
create a fwding function?

-----Original Message-----
From: Peter Dimov [mailto:pdimov_at_[hidden]]
Sent: Wednesday, January 30, 2002 10:09 PM
To: boost_at_[hidden]
Subject: Re: [boost] boost bind/functional/reference wrapper/mem_fn
> Also, I think it was a Scott Meyers' article that discussed not being
> able to use standard algorithms in functions like ptr_fun because they
> may include additional default parameters, which ptr_fun may not be
> aware of (I hope I'm getting this right). It is hard for me by
looking
> at the code to make certain (compounded by the fact I can't find the
> article right now) so would boost::bind be able to be a workaround for
> such a problem?

Unfortunately not. Once a function converts to a function pointer, there
is
no way to determine the default arguments, if any.

The only way to do it portably is to write a forwarding function. I
don't
like it but this is what the standard says.

Some compilers "remember" the default arguments and allow such uses but
this
is non-standard (and may be classified as a bug.)

Info: http://www.boost.org Send unsubscribe requests to:
<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