From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2006-01-19 13:57:41
"Tobias Schwinger" <tschwinger_at_[hidden]> wrote
> Arkadiy Vertleyb wrote:
> > "Tobias Schwinger" <tschwinger_at_[hidden]> wrote
> >> // [...]
> >>--- at the end of every source file:
> >> #if defined(<LIB>_TYPEOF_SUPPORT)
> >> # include <boost/<LIB>/typeof_support.hpp>
> >> #endif
> ^^^^ The conditional could be factored out into another header file...
> > OK, understand. The last lines above make this solution intrusive, and
> > is intrusive as well...
> Why is "intrusiveness" undesirable in this context?
1) A library may be targeted for inclusion into the Standard, in which case
it would not be appropriate for it to depend on typeof.
2) The typeof library is a temporary solution. Once the typeof operator is
in the Standard, and is implemented by the compiler vendors, and Boost no
longer supports any legacy compiler with no native typeof, the registration
stuff will need to be removed. It's a little easier to do if done
3) It might be nice to have a similar scheme for Boost libraries and for the
Standard Library. The latter, obviously, can't be done intrusively.
> + library authors can freely choose the granularity level for doing the
> + it can be used in combination with #1 in cases where more fine grained
> control over Typeof support makes sense
> - it's quite complicated
- it introduces unnecessary dependencies -- when a type is added/changed
this is reflected in the header that is used by the clients having nothing
to do with this type.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk