Boost logo

Boost :

Subject: [boost] [units] c++11 features to speed up compilation times
From: Oliver Esser (bossadinova_at_[hidden])
Date: 2013-03-19 08:44:44


Hi,

I was wondering if there was a policy for boost including C++11 features
into the libraries. Obviously there might be many projects out there
that do not (yet) have access to a compiler implementing the new
standard or choosing not to use such a compiler.

Anyways I was looking for a dimensional analysis library for compile
time units checking and found Boost.Units to be quite slow at compile
time even for the relatively small example code in the quickstart
documentation. So I've written a bit of code that follows the approach
of Boost.Units but uses C++11 features (constexpr, variadic templates,
suffix operator, auto). It is not a complete library that I would use in
a production environment, but it looks promising, since compilation
times are about a factor 2-3 faster on my machine. It would be great if
some of you could take a look.

https://github.com/legento/units

Maybe one could add an implementation like that to Boost.Units as a
C++11 compiler detected feature to speed things up. Maybe I am totally
wrong and it is some coincidence that this compiles faster on my
platform. I did just minimalistic 'ok it seems to work' testing and was
about as thorough with measurements. So see this as an implementation
sketch.

Regards
Oliver


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