Boost logo

Boost :

From: Deane Yang (deane_yang_at_[hidden])
Date: 2005-02-01 22:45:30

This sounds good to me. Just one more enhancement, please. Given
arithmetic types T1 and T2, dimension types X1 and X2, and an operator,
then there are (user-defined) rules to determine result types T3 and X3
so that

<T1, X1> op <T2,X2> returns a <T3,X3>

A framework for doing this would be very useful to me.

Matt Austern wrote:
> There's actually something even lower level than a dimension library.
> In essence, what we've got is:
> - We're generalizing the notion of an arithmetic type T to a type of
> the form <T,X>, where X is some sort of tag.
> - For any X1 and X2 and any arithmetic operation 'op', we have rules
> for whether <T,X1> op <T,X2> is well defined. If it is then the
> result is tagged as <T,X3>, and we have rules to determine X3 in terms
> of X1, X2, and op.
> All of the knowledge about how to represent dimensional systems (mpl
> vectors, compile-time fractions, etc.) is higher level than this.
> --Matt
> _______________________________________________
> Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at