D
Daniel Pitts
Are there any popular expression template libraries that support
all/most arithmetic operators, and that allow "compound" expressions to
be created?
for example...
template<typename A, typename B>
struct Multiply;
template<typename A, typename B>
struct Add;
x = Multiply<double, double>(1,3) + 4;
where x might be of type Add<Multiply<double, double>, int>.
I was thinking of creating my own, but if there is an existing one that
handles all the odd cases (such as avoiding infinite recursion), all the
better.
all/most arithmetic operators, and that allow "compound" expressions to
be created?
for example...
template<typename A, typename B>
struct Multiply;
template<typename A, typename B>
struct Add;
x = Multiply<double, double>(1,3) + 4;
where x might be of type Add<Multiply<double, double>, int>.
I was thinking of creating my own, but if there is an existing one that
handles all the odd cases (such as avoiding infinite recursion), all the
better.