Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2006-08-18 13:43:47

"Eric Lemings" <lemings_at_[hidden]> wrote in message
>> -----Original Message-----
>> From: boost-bounces_at_[hidden]
>> [mailto:boost-bounces_at_[hidden]] On Behalf Of Thorsten Ottosen
>> Sent: Friday, August 18, 2006 4:35 AM
>> To: boost_at_[hidden]
>> Subject: Re: [boost] Boost Units library preview
>> Andy Little <andy <at>> writes:
>> > // Quan
>> > quan::length::ft qft(3);
>> > std::cout << "quan qft.numeric_value() = "<<
>> qft.numeric_value() << '\n';
>> > assert(qft.numeric_value() ==3);
>> Just a question: why is the member called numeric_value? are
>> there other values?
> I think Thorsten's question is a sympotom of a larger issue.
> Why does Quan use such convoluted terminology? Fixed quantity?

fixed_quantity is the name of the class template implemented so far ( one of 3
or possibly 4 different classes). It has gone through various names. Once just
quantity, then ct_quantity, then t1_quantity, now fixed_quantity. It is a
quantity where the Unit is fixed at runtime. All suggestions for alternate names
are welcome.

> Abstract quantity?

An abstract quantity is a quantity without a numeric value or a conversion
factor. It still conforms to dimensional analysis and dimensional math.
In fact the abstract quantity concept (small c) has now been gobbled up by the
all encompassing Static Unit concept.

> Coherent quantity?

PQS used the term coherent quantity to refer to a 'clean' si quantity. We now
went for the simpler 'SI unit'.

> Named quantity?

A named quantity has a name. In practise in Quan-0_2_0 this means that, where U
is a model of StaticUnit and is_named_quantity<U>::value is true, that
get_named_quantity_traits<U>::type , returns a traits class, which provides
useful information, such as the name of the quantity and other information
mainly useful for I/O purposes.

> Concrete quantity?

A concrete quantity is a quantity which has a unit and a numeric value.

> Anonymous quantity?

An anonymous quantity doesnt have a name, kind of the opposite of a named
quantity. is_named_quantity<U>::value is false for anonymous quantities in the
next version of Quan, and so their Named Quantity Traits class is effectively

> Static unit?

This is a proper C++ Concept. Effectively its a compile time database
which can be queried about various aspects of a particular fixed_quantity. It is
a template parameter to fixed_quantity:


> United value?

It is a detail of the implementation. Has it leaked into the docs somewhere? If
so I will remove it as it may change without notice.

> A
> general-purpose library should use simple terms and a bare minimum
> of names.

I am happy to accept that I am not very good at the documentation side of
things. Luckily now I am getting some very good help with the Quan documentation
and the code in general and that I hope will be reflected in the next version of

Andy Little

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