|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-04-27 11:05:18
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.
> 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.)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk