Boost logo

Boost :

From: Jeff Garland (jeff_at_[hidden])
Date: 2001-07-20 07:59:17


> However, for Boost libraries I think the idea
> has promise. When I was primarily writing traditional OO code, forward
> declaration was de rigeur, but I confess to have mostly given up the
> practice as more and more of my code has become templatized. That's probably

I have had much the same experience. Since much template code is involved with
type generation, the idea of avoiding compile time dependency doesn't make sense
for the "client". It is only when a client is trying to avoid exposing a
template based implementation in a header (ala my map example). Of course there
are other ways to achieve implementation hiding.

> Before we embark on such a change, however, I think it's important to have
> some clear idea of the potential benefit to users. Are there numbers? If
> they've been posted, I must have missed them.

Agreed. And, it is clearly going to depend on the nature of what the library
provides. For iosfwd there is a strong case, b/c it declares of global objects.
Nothing in boost does this sort of thing. It might be interesting for someone
to just go thru the current boost libraries and try to make a case for when
forwarding would be useful.

Jeff


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