From: Daniel Walker (daniel.j.walker_at_[hidden])
Date: 2007-04-27 11:23:40
On 4/27/07, Peter Dimov <pdimov_at_[hidden]> wrote:
> Daniel Walker wrote:
> >> I'm not at all sure that breaking the code of all boost::bind users
> >> who happen to use precompiled headers with Borland and g++ is
> >> acceptable.
> > I agree that breaking code should be avoided if at all possible. And
> > good news! I just ran the test suite with g++ 4.1 using precompiled
> > bind.hpp and mem_fn.hpp and everything passed with object
> > placeholders. What version of g++ had broken PCH and needed the inline
> > placeholders?
> I don't remember. We should conservatively assume that 4.0 and below need
> the workaround. I don't object to us switching to "real" placeholders for
> 4.1 and later based on your report.
Great! I'll send another patch that will leave borland and g++ <= 4.0
as they were.
> > Actually, what led me down this road is that it's not possible to
> > overload operators for built-in types like functions or function
> > pointers.
> Yes, this is one of the reasons why boost::bind( ... ) == 5 is valid, but _1
> == 5 is not (the other being that given placeholder interoperability, both
> Bind and Lambda will claim _1 == 5 as their own.)
Right. As long as lambda has it's own placeholders you'll need to
disambiguate them with namespace qualification or using directives. My
goal is to make either choice of placeholders work. Then eventually
(perhaps several releases from now) lambda may be able to exclusively
support the standard placeholders without requiring its own.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk