Boost logo

Boost :

From: Matthias Schabel (boost_at_[hidden])
Date: 2007-02-07 13:24:31

> But I wanted to ask if you have some example demonstrating this, or
> is it explained in docs. Because frankly speaking I don't understand
> what you mean here. I type 'make clean' and then I type 'make'.
> Nothing is precompiled at this stage, so how I can save time?
> My app is huge, and it already takes long to compile, so I prefer to
> use this "one-time cost" solution.

Hi Janek,

I may have been a bit imprecise previously - there are two issues here :

1) reprocessing of all the header files with every compilation. this
can be mitigated by preprocessing those headers that are stable
(don't change
frequently) such as Boost library headers. the details depend on
which compiler
you are using; here's a link to the gcc docs:

2) doing the compile-time MPL stuff. here, if your program is really
only dealing
with a restricted set of units, you can use explicit template
instantiation :

of course, this only works if you are only working with pre-defined
units (like
from the SI system); if there are numerous unit computations within
your main
code, this doesn't solve the problem...


Matthias Schabel, Ph.D.
Assistant Professor, Department of Radiology
Utah Center for Advanced Imaging Research
729 Arapeen Drive
Salt Lake City, UT 84108
801-587-9413 (work)
801-585-3592 (fax)
801-706-5760 (cell)
801-484-0811 (home)
matthias dot schabel at hsc dot utah dot edu

Boost list run by bdawes at, gregod at, cpdaniel at, john at