Boost Users :
From: David Abrahams (dave_at_[hidden])
Date: 2005-01-07 08:27:29
Douglas Gregor wrote:
> On Jan 6, 2005, at 5:25 PM, Philippe Mori wrote:
>> When I compile the code I get the following warning "RTTI option is
>> disabled" at the line with the following macro call
>> BOOST_FUNCTION_COMPARE_TYPE_ID in function
> Function allows you to ask about the return type (via
> boost::function<...>::type()) and to extract the type, for which it
> needs RTTI. However, this feature could be #ifdef'd out. We had
> (briefly) discussed adding a BOOST_NO_RTTI macro for this purpose back
> in September. Perhaps it's time to reopen that discussion.
>> Also, a lambda function like (((1.0 * _1 + 2.0) * _1 + 3.0) * _1 +
>> 4.0) * _1
>> + 5.0 cause my data segment to increase of 6K which is huge when the
>> is 64K...
>> Using a static function (and not using boost::lambda) instead does not
>> such increase of the use of the data segment.
> I'm surprised that the increase is so large, but not that it exists.
> _1, _2, etc. are namespace-level variables (by necessity) and will be
> replicated in each translation unit where they are used.
But they shouldn't be. We have to get them out of the unnamed namespace
anyway for ODR reasons.
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net