Boost logo

Boost :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2006-01-19 09:42:59


"Tobias Schwinger" <tschwinger_at_[hidden]> 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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk