Boost logo

Boost :

From: vesa_karvonen (vesa_karvonen_at_[hidden])
Date: 2002-02-06 10:11:05


--- In boost_at_y..., "Brey, Edward D" <EdwardDBrey_at_e...> wrote:
>Suppose I'm coding along in my project and I find I need a
>scoped_ptr. I include <boost/smart_ptr.hpp> in my precompiled
>header. I pay for a recompile of everything. It's worth it, of
>course, because subsequent incremental compilations are much
>faster. Now suppose I need scoped_array. Well, as luck would have
>it, I don't have to recompile everything. Had I been using maximally
>small granularity, I would have had to put <boost/scoped_array.hpp>
>into my precompile header and paid for a full recompile. Instead, by
>paying for a trivially longer precompilation, which included some
>classes I didn't immediately use, I saved myself time in the long
>run.

I think that your logic is flawed.

Here is how the scenario would go when using minimal headers:

When you find that you need scoped_ptr in some translation unit, you
include it there and recompile only the translation unit.

When you later find that you need scoped_array in some translation
unit, you include it there and recompile only the translation unit.

In a very large project, you would have been able to compile and test
both changes in a couple of minutes using minimal granularity
headers. With precompiled headers it might have taken all day to
recompile the whole project.


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