
On 19-03-2013 19:36, Vicente J. Botet Escriba wrote:
Le 19/03/13 13:44, Oliver Esser a écrit :
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. I'm sure that the Unit author will accept patches going forward a C++11 implementation. I suggest you to prepare a patch to introduce constexpr and another to variadic templates separately and see how this improves the compilation time. Even if the compilation time is not improved substantially these should improve the library however.
+1. Please make the accessor function constexpr too, to we can perform full compile time computations. -Thorsten