Boost logo

Boost :

From: Kevlin Henney (kevlin_at_[hidden])
Date: 2000-11-07 15:51:20


In message <D3E6C22AF7F13B4FB2490F89879B408F06609E_at_SEA-DOG>, Gary Powell
<Gary.Powell_at_[hidden]> writes
>> This raises an interesting question if any were to move from class to
>> typedef: For library users, should the same requirements that exist on
>> forward declaring entities in the standard (ie that you can't) also be
>> applied to Boost?
>>
>After having complained that this wasn't possible for STL containers, I
>modified the views library (VTL) to have a viewName_fwd.hpp file for every
>view. Then the viewName.hpp file includes the *_fwd.hpp file to guarantee
>that it is correct. It of course doubled the number of interface files but I
>think it was worth it because it allows specification of a class with a
>pointer to a view, without having to include that view.
>
>So while any.hpp is a small file to parse, an any_fwd.hpp file would be an
>appropriate addition.

I made the suggestion, some time ago, that we should perhaps consider
forward declaring headers as part of Boost style. Perhaps we could at
least experiment with it, providing a stable body of prior art for other
libraries and maybe the standard library itself.

If that sounds like a reasonable idea, I will add an any-fwd.hpp.

Kevlin
____________________________________________________________

  Kevlin Henney phone: +44 117 942 2990
  Curbralan Limited mobile: +44 7801 073 508
  mailto:kevlin_at_[hidden] fax: +44 870 052 2289
  http://www.curbralan.com
____________________________________________________________


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