Boost logo

Boost Users :

Subject: Re: [Boost-users] Dynamically creating new units
From: OvermindDL1 (overminddl1_at_[hidden])
Date: 2009-12-25 18:02:49


On Fri, Dec 25, 2009 at 11:33 AM, Brandon Olivares
<programmer2188_at_[hidden]> wrote:
> On 2009-12-25, OvermindDL1 wrote:
>>  As for dynamically creating types, you can do that all you wish, but
>> you have no type information then (unless you use variant or any or
>> something, but that has needless overhead, well, maybe not variant).
>> That is the point of Boost.Units, to enforce that you are doing things
>> correctly, at compile time, it optimizes completely out at run-time.
>
> OK thanks, perhaps you are right. I'm just really trying to figure out a way
> to make compilation a bit faster. My concern is that since these are in
> header files, well any source file that needs units will require them all to
> be processed again, and that is really inconvenient.

Yep, that is the major hazard of C++. If you learn how to structure
things differently and use forward declarations and less class member
functions (use external functions instead, ala C), that can speed up
compilation tremendously.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net