
"Tobias Schwinger" <tschwinger@neoscientists.org> wrote
The library [option #2] would implement typeof support like this:
--- boost/<LIB>/typeof_support.hpp
#if !defined(<LIB>_TYPEOF_SUPPORT) # define <LIB>_TYPEOF_SUPPORT #endif
#if defined(<include guard macro 1st file>) # if !defined(<typeof guard macro 1st file>) # define <typeof guard macro 1st file> // <-- register components in file 1 here # endif #endif
#if defined(<include guard macro 2nd file>) # if !defined(<typeof guard macro 2nd file>) # define <typeof guard macro 2nd file> // <-- register components in file 2 here # endif #endif
// [...]
--- at the end of every source file:
#if defined(<LIB>_TYPEOF_SUPPORT) # include <boost/<LIB>/typeof_support.hpp> #endif
OK, understand. The last lines above make this solution intrusive, and #3 is intrusive as well... What are the drawbacks of #1? Regards, Arkadiy