You can cut the compilation time a bit by using only the "portable" syntax and #including only
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. thx mortee