Boost logo

Boost :

From: Daniel Frey (d.frey_at_[hidden])
Date: 2004-01-24 13:01:44


I uploaded the new version of the constant library to the files section.
Additionally, I added an example which shows how it can be used with a
unit library, e.g. YANL 2.2. The constant library itself is independent
of the unit library, and I hope that it can be transfered to the other
unit libraries as well. A short appetizer:

The promised clean and simple syntax for the idealGasLaw-constant works:

template< typename Y >
inline typename SI< Y >::quantity
idealGasLaw( const typename SI< Y >::pressure& p,
             const typename SI< Y >::volume& v,
             const typename SI< Y >::temperature& t )
{
    using boost::units::si::constants::chemistry::R;
    return p * v / ( R * t );
}

Tested on GCC 3.3.2 and Intel 7.1. Grab the files at:

<http://groups.yahoo.com/group/boost/files/MathConstants/>

Currently, they don't contain any documentation, but after the
refactoring, this is on the top of my list. Any comments welcome.

Regards, Daniel


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