From: Andy Little (andy_at_[hidden])
Date: 2006-01-19 07:14:14


"Peder Holt" wrote

> Personally, I don't like the 2nd approach, as it introduces include
> order dependencies,
> <boost/a_lib/a_component.hpp> must be included prior to including
> <boost/a_lib/typeof_support.hpp>
>
> Creating a header called my_includes.hpp that contains:
> #include <boost/a_lib/a_component.hpp>
> #include <boost/a_lib/typeof_support.hpp>
> and in my_program.cpp including
>
> #include <my_includes.hpp>
> #include <boost/a_lib/another_component.hpp>
>
> gives a different behaviour from
>
> #include <boost/a_lib/another_component.hpp>
> #include <my_includes.hpp>
>
>>From my perspective, this is unacceptable.

OK I see thats no good, so how about the 3rd approach? Each library needs to
detect if a Macro with a common format is defined and if it is do (one-time)
typeof registration. That would make that approach best from point of
simplicity. A global macro which triggers the per library macro could be
possible too for a user that is feeling lazy about figuring out which libraries
to register.

regards
Andy Little