Boost logo

Boost :

From: Benoit (benoit.casoetto_at_[hidden])
Date: 2008-08-21 08:37:39


>>That would make it possible to easily separate the compilation of
>>boost classes (or at least their methods) from that of user-defined
>>classes.
> No, unfortunately, it wouldn't, because you have to pull in the
> definitions to use the template class, what you want is precompiled
> headers.

This is not exactly true. I already use such an approach in my own
developments.
The idea is to use concepts to make sure that the right member
functions are called inside a cpp file and therefore will be compiled
and usable everywhere.That would mean pulling in all related
implementation details... But only for one compilation unit (created
with that purpose in mind). Other compilation units would only have
access to template class definitions. For that matter, i personally
use the .h extension for template class definitions and .hpp for
template class method definitions (but that's only an example of what
could be done).

Note that i agree that it would also bring a readability benefit to
the source code.

Benoît


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