From: Andy Little (andy_at_[hidden])
Date: 2005-05-10 03:37:39
"Tobias Schwinger" <tschwinger_at_[hidden]> wrote
> Btw. Daniel Frey's library looks very interesting - did you take a look at it
I looked at it during the math constants review. I didnt look at the latest
version, but I have now. Unfortunately it doesnt compile on VC7.1 but looks like
a smarter version of my offering. (I guess that 's where the idea for mine came
from.) OTOH it doesnt do eg double(pi) which syntax I happen to like.
> It uses expression templates to allow "constant expressions" e.g: 'pi * two'
> or 'pow(two,one / twelve)'
Thats interesting . I need this type of thing , but its clumsy in use.
In an ideal world I guess one would be able to say e.g pow(my_num, n ,d );
and get the function template <typename T, int N, int D > T pow(T,N, D);
> and (just as your test) does "context-detection" to get the type from the
> expression the constant is used in (well, if users want this, so be it - heigh
> ho ;-) ).
It does fit most of the criteria laid down in the review, but perhaps its just
too smart :-)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk