Boost logo

Boost Users :

From: Douglas Gregor (dgregor_at_[hidden])
Date: 2005-01-07 07:34:54


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
> boost::detail::function::functor_manager::manage().

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
> limit
> is 64K...
>
> Using a static function (and not using boost::lambda) instead does not
> cause
> 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.

> Another thing that I have noticed is that the compiler get very slow
> as I am
> starting to uses some boost libraries like that (a few more seconds per
> file).

The curse of template-heavy code :( There isn't much we can do about
this, unfortunately.

        Doug


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