|
Boost : |
From: Matthias Schabel (boost_at_[hidden])
Date: 2004-01-12 22:10:53
> Compile-time is an issue. What if the library can be put into a check-
> and non-check-mode? During development, I'd use the check-mode to make
> sure that my code is correct. For the release build, I would disable
> all checking as this checking was already done in my debug builds.
> Disableing checking would then not use MPL, all units/dimensions are
> equal and whatever you do it gets accepted. This could possibly safe a
> lot of instantiations, thus both memory and time during the
> compilation. Don't know if it's worth the effort, but as I said, it's
> just an idea.
Yes, this may be an option to allow the user to make some choices about
compile time speed vs. correctness. I have been thinking about adding
switches to control some things on a more fine grained level : if the
tags are
guaranteed to appear in a fixed order and not have duplicates, that
simplifies things significantly and will, I suspect (but haven't tested
yet) lead to significant compile time improvements.
> PS: Matthias' example idealGasLaw() sent my constant library back to
> the design phase (*sigh*). The main problem is the lack of typeof,
> even the currently available extensions from GCC and the
> Intel-compiler (__typeof__) only give me internal compiler errors :(
Sorry...the whole library also has an unfortunate tendency to send
compilers to the graveyard... BTW, when you get the gcc people to put
in typeof, please put in a request for template typedefs for me ;^)
> PPS: Matthias: Is there a recent version of your library available
> somewhere or is the v2.2 in the files section the most current one?
You should be able to use the 2.2 version for now. I'm going to fix up
some stuff, add changes in static_rational that Andy and Jan have
suggested and maybe a bit more, but it will probably be a week or two
before I have anything concrete. BTW, I'm thinking about decoupling
units from systems, so instead of declarations like :
SI<double>::length
you'd have
quantity<SI,length,double>
Does that have design ramifications for the constants library?
------------------------------------------------------------------------
---------------------------
Matthias Schabel, Ph.D.
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)
mschabel at ucair med utah edu
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk