Boost logo

Boost :

From: Dan W. (danw_at_[hidden])
Date: 2004-01-06 09:11:56

Daniel Frey wrote:
> speed = length/time
> (which you can't use that way directly, as C++-types don't work that
> way) and

It would be soooo nice, though...

> mph = mile/hour
> The former can probably be written like this:
> typedef divide< length, time >::type speed;

Tried to learn MPL but ran out of aspirins... Would be nice if it had
something like a "compile time factory method" to create types using
short and intuitive syntax as in the first expression, or say,

typedef mile/hour mph;

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