Boost logo

Boost Users :

From: Marton Fabo (morton_at_[hidden])
Date: 2003-10-21 22:10:22

> You can cut the compilation time a bit by using
> only the "portable" syntax and #including only
> <boost/function/functionN.hpp> for the appropriate Ns. That will
> expose less code to the compiler, though I wouldn't expect a dramatic
> change.

I will try that, thanks.

> The interesting thing about your problem is that Boost.Function is
> exactly the sort of thing one uses to *eliminate* recompilation
> dependencies: by hiding the real type of the member/function pointer
> or function object it wraps behind a single polymorphic type, you can
> prevent changes to the wrapped type from affecting other code.

Well, yes. Ideally, it would do that, but unfortunately the concepts I
want to implement in the program in question aren't yet mature enough
either - and every change to a class definition which uses function.hpp
will cause the other compilation units which use that class to be
recompiled, along with function.hpp ...

> One thing to keep in mind: Boost.Function can be expensive to copy
> (both in time and in code space) if you're wrapping stateful function
> objects. Consider passing it by reference.

OK, I'll keep that in mind.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at