Boost logo

Boost Users :

Subject: Re: [Boost-users] units length operator * / area
From: Michael Powell (mwpowellnm_at_[hidden])
Date: 2011-09-08 11:19:10

On Thu, Sep 8, 2011 at 8:23 AM, Michael Powell <mwpowellnm_at_[hidden]> wrote:

> Units users,
> How do I define an operator* which takes a
> quantity<length>,quantity<length> and returns a quantity<area>? This doesn't
> seem to be defined in the boost::units, which somewhat surprises me. How do
> we make something like that part of the core definition?

My mistake. I was multiplying quantity<length> * quantity<length> * float
(effectively), which doesn't work. Instead my PI value needs to be captures
by a dimensionless, then it works like a charm.

> Michael

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at