Boost logo

Boost-Build :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2004-09-06 11:20:14

"Toon Knapen" <toon.knapen_at_[hidden]> wrote in message
| Vladimir Prus wrote:
| > I'd think that header should only include standard headers, not the
| > application's headers.
| I understand that PCH support is not easy but if it is available, it
| should also be able to use precompiled headers for non-system headers
| (i.e. application headers) IMO.

some compilers only support one pch-file.

| >
| > Another danger is that if all translation units include the central header,
| > which grabs <vector>, <map>, <algorithm> and the like, then the programmers
| > might forget to add those include to translation units themself, so with
| > "USE_PCH" undefined there will be compile errors. Seems not good for
| > cross-platform programming.
| >
| I also wondered about this so I'm keen to know the answer too.

is this really a problem?

| The problem is still that translation unit
| > which uses std::vector without include <vector> will compile fine with PCH,
| > but won't compile elsewhere.
| Anyway, to benefit from PCH, it is best to make a giant header which
| includes all headers IIUC (as read in C++ templates of Vandevoorde and
| Josuttis). Because a including the same headers but in a different order
| results in a different compiler-state.

I would hope these two headers could be added to boost:


the latter should include the former.

and then we should have macros like


I suggest we start investigating how pch can be used from the command line from all the compilers. I can help with
comeau and vc7.1 at least. We just needs a person in charge of the whole operation..




Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at