Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2004-01-08 05:34:02


"Anatoli Tubman" <anatoli_at_[hidden]> wrote in message
news:200401081217.23921.anatoli_at_ptc.com...
> On Wednesday 07 January 2004 11:53, Daniel Frey wrote:
>
> > Definitly. Why isn't the current operator ^ spelled ~ anyway? Then ^
> > could have the right precedence and meaning. Think of m/s^2. Damn
> > C-ompatibility ;)
>
> Alas, this won't help because m^2 and m^3 should have different types.
> One needs an ability to overload on integral constant expressions:
>
> unit::m2 operator^ (unit::m x, 2) { ... }
> unit::m3 operator^ (unit::m x, 3) { ... }

Or else we need a language that fully and seamlessly supports
metaprogramming.

Dave

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.556 / Virus Database: 348 - Release Date: 12/26/2003

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