Boost logo

Boost :

From: Matthias Schabel (boost_at_[hidden])
Date: 2007-04-21 01:50:44


It would be nice if we could represent all compile-time algebraic
operations in Boost.Units using MPL arithmetic. At present, MPL
supports negate, adds, subtracts, times, divides. Boost.Units
additionally would require :

1) unary_plus - the compile-time equivalent of operator+(T)
2) unary_minus - the compile-time equivalent of operator-(T); this is
identical to current mpl::negate, but it would be nice to have it for
notational consistency with unary_plus
3) power<T,U> (or pow<T,U>) - the compile-time equivalent of pow(T,U)
4) root<T,U> - the compile-time equivalent of pow(T,1/U); can be
implemented with power<T,U>, but this is a nicer syntax

to eliminate its remaining compile-time algebra operators. Any
thoughts on whether this would be a worthwhile addition to MPL?

Matthias


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