code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_STATIC_RATIONAL_HPP
#define BOOST_UNITS_STATIC_RATIONAL_HPP

#include <boost/integer/common_factor_ct.hpp>
#include <boost/mpl/less.hpp>
#include <boost/mpl/arithmetic.hpp>

#ifdef __BORLANDC__
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/integral_c.hpp>
#include <boost/mpl/identity.hpp>
#endif

#include <boost/units/config.hpp>
#include <boost/units/operators.hpp>

/// \file
/// \brief Compile-time rational numbers and operators.

namespace boost {

namespace units {

namespace detail {

struct static_rational_tag {};

}

typedef long   integer_type;

/// Compile time absolute value.
template<integer_type Value>
struct static_abs
{
    BOOST_STATIC_CONSTANT(integer_type,value = Value < 0 ? -Value : Value);
};

// Compile time rational number.
/**
This is an implementation of a compile time rational number, where @c static_rational<N,D> represents
a rational number with numerator @c N and denominator @c D. Because of the potential for ambiguity arising
from multiple equivalent values of @c static_rational (e.g. @c static_rational<6,2>==static_rational<3>),
static rationals should always be accessed through @c static_rational<N,D>::type. Template specialization
prevents instantiation of zero denominators (i.e. @c static_rational<N,0>). The following compile-time
arithmetic operators are provided for static_rational variables only (no operators are defined between
long and static_rational):
    - @c mpl::negate
    - @c mpl::plus
    - @c mpl::minus
    - @c mpl::times
    - @c mpl::divides

Neither @c static_power nor @c static_root are defined for @c static_rational. This is because template types
may not be floating point values, while powers and roots of rational numbers can produce floating point
values.
*/
#ifdef __BORLANDC__

template<integer_type X>
struct make_integral_c {
    typedef boost::mpl::integral_c<integer_type, X> type;
};

template<integer_type N,integer_type D = 1>
class static_rational
{
    public:

        typedef static_rational this_type;

        typedef boost::mpl::integral_c<integer_type, N> N_type;
        typedef boost::mpl::integral_c<integer_type, D> D_type;

        typedef typename make_integral_c<
            (::boost::integer::static_gcd<
                ::boost::units::static_abs<N>::value,
                ::boost::units::static_abs<D>::value
            >::value)>::type gcd_type;
        typedef typename boost::mpl::eval_if<
            boost::mpl::less<
                D_type,
                boost::mpl::integral_c<integer_type, 0>
            >,
            boost::mpl::negate<gcd_type>,
            gcd_type
        >::type den_type;

    public:
        // for mpl arithmetic support
        typedef detail::static_rational_tag tag;

        BOOST_STATIC_CONSTANT(integer_type, Numerator =
            (::boost::mpl::divides<N_type, den_type>::value));
        BOOST_STATIC_CONSTANT(integer_type, Denominator =
            (::boost::mpl::divides<D_type, den_type>::value));

        /// INTERNAL ONLY
        typedef static_rational<N,D>    this_type;

        /// static_rational<N,D> reduced by GCD
        typedef static_rational<
            (::boost::mpl::divides<N_type, den_type>::value),
            (::boost::mpl::divides<D_type, den_type>::value)
        >  type;

        static integer_type numerator()      { return Numerator; }
        static integer_type denominator()    { return Denominator; }

        // INTERNAL ONLY
        static_rational() { }
        //~static_rational() { }
};
#else
template<integer_type N,integer_type D = 1>
class static_rational
{
    private:

        static const integer_type   nabs = static_abs<N>::value,
                                    dabs = static_abs<D>::value;

        /// greatest common divisor of N and D
        // need cast to signed because static_gcd returns unsigned long
        static const integer_type   den =
            static_cast<integer_type>(boost::integer::static_gcd<nabs,dabs>::value) * ((D < 0) ? -1 : 1);

    public:
        // for mpl arithmetic support
        typedef detail::static_rational_tag tag;

        static const integer_type   Numerator = N/den,
            Denominator = D/den;

        /// INTERNAL ONLY
        typedef static_rational<N,D>    this_type;

        /// static_rational<N,D> reduced by GCD
        typedef static_rational<Numerator,Denominator>  type;

        static integer_type numerator()      { return Numerator; }
        static integer_type denominator()    { return Denominator; }

        // INTERNAL ONLY
        static_rational() { }
        //~static_rational() { }
};
#endif

}

}

#if BOOST_UNITS_HAS_BOOST_TYPEOF

#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()

BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::static_rational, (long)(long))

#endif

namespace boost {

namespace units {

// prohibit zero denominator
template<integer_type N> class static_rational<N,0>;

/// get decimal value of @c static_rational
template<class T,integer_type N,integer_type D>
inline typename divide_typeof_helper<T,T>::type
value(const static_rational<N,D>&)
{
    return T(N)/T(D);
}

} // namespace units

#ifndef BOOST_UNITS_DOXYGEN

namespace mpl {

#ifdef __BORLANDC__

template<>
struct plus_impl<boost::units::detail::static_rational_tag, boost::units::detail::static_rational_tag>
{
    template<class T0, class T1>
    struct apply {
        typedef typename boost::units::static_rational<
            ::boost::mpl::plus<
                boost::mpl::times<typename T0::N_type, typename T1::D_type>,
                boost::mpl::times<typename T1::N_type, typename T0::D_type>
            >::value,
            ::boost::mpl::times<typename T0::D_type, typename T1::D_type>::value
        >::type type;
    };
};

template<>
struct minus_impl<boost::units::detail::static_rational_tag, boost::units::detail::static_rational_tag>
{
    template<class T0, class T1>
    struct apply {
        typedef typename boost::units::static_rational<
            ::boost::mpl::minus<
                boost::mpl::times<typename T0::N_type, typename T1::D_type>,
                boost::mpl::times<typename T1::N_type, typename T0::D_type>
            >::value,
            ::boost::mpl::times<typename T0::D_type, typename T1::D_type>::value
        >::type type;
    };
};

template<>
struct times_impl<boost::units::detail::static_rational_tag, boost::units::detail::static_rational_tag>
{
    template<class T0, class T1>
    struct apply {
        typedef typename boost::units::static_rational<
            ::boost::mpl::times<typename T0::N_type, typename T1::N_type>::value,
            ::boost::mpl::times<typename T0::D_type, typename T1::D_type>::value
        >::type type;
    };
};

template<>
struct divides_impl<boost::units::detail::static_rational_tag, boost::units::detail::static_rational_tag>
{
    template<class T0, class T1>
    struct apply {
        typedef typename boost::units::static_rational<
            ::boost::mpl::times<typename T0::N_type, typename T1::D_type>::value,
            ::boost::mpl::times<typename T0::D_type, typename T1::N_type>::value
        >::type type;
    };
};

template<>
struct negate_impl<boost::units::detail::static_rational_tag>
{
    template<class T0>
    struct apply {
        typedef typename boost::units::static_rational<
            ::boost::mpl::negate<typename T0::N_type>::value,
            ::boost::mpl::identity<T0>::type::Denominator
        >::type type;
    };
};

template<>
struct less_impl<boost::units::detail::static_rational_tag, boost::units::detail::static_rational_tag>
{
    template<class T0, class T1>
    struct apply
    {
        typedef mpl::bool_<((mpl::minus<T0, T1>::type::Numerator) < 0)> type;
    };
};

#else

template<>
struct plus_impl<boost::units::detail::static_rational_tag, boost::units::detail::static_rational_tag>
{
    template<class T0, class T1>
    struct apply {
        typedef typename boost::units::static_rational<
            T0::Numerator*T1::Denominator+T1::Numerator*T0::Denominator,
            T0::Denominator*T1::Denominator
        >::type type;
    };
};

template<>
struct minus_impl<boost::units::detail::static_rational_tag, boost::units::detail::static_rational_tag>
{
    template<class T0, class T1>
    struct apply {
        typedef typename boost::units::static_rational<
            T0::Numerator*T1::Denominator-T1::Numerator*T0::Denominator,
            T0::Denominator*T1::Denominator
        >::type type;
    };
};

template<>
struct times_impl<boost::units::detail::static_rational_tag, boost::units::detail::static_rational_tag>
{
    template<class T0, class T1>
    struct apply {
        typedef typename boost::units::static_rational<
            T0::Numerator*T1::Numerator,
            T0::Denominator*T1::Denominator
        >::type type;
    };
};

template<>
struct divides_impl<boost::units::detail::static_rational_tag, boost::units::detail::static_rational_tag>
{
    template<class T0, class T1>
    struct apply {
        typedef typename boost::units::static_rational<
            T0::Numerator*T1::Denominator,
            T0::Denominator*T1::Numerator
        >::type type;
    };
};

template<>
struct negate_impl<boost::units::detail::static_rational_tag>
{
    template<class T0>
    struct apply {
        typedef typename boost::units::static_rational<-T0::Numerator,T0::Denominator>::type type;
    };
};

template<>
struct less_impl<boost::units::detail::static_rational_tag, boost::units::detail::static_rational_tag>
{
    template<class T0, class T1>
    struct apply
    {
        typedef mpl::bool_<((mpl::minus<T0, T1>::type::Numerator) < 0)> type;
    };
};

#endif

}

#endif

} // namespace boost

#endif // BOOST_UNITS_STATIC_RATIONAL_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_HPP
#define BOOST_UNITS_SI_HPP

/// \file
/// Includes all the si unit headers

#include <string>

#include <boost/units/quantity.hpp>

#include <boost/units/systems/si/base.hpp>

#include <boost/units/systems/si/absorbed_dose.hpp>
#include <boost/units/systems/si/acceleration.hpp>
#include <boost/units/systems/si/action.hpp>
#include <boost/units/systems/si/activity.hpp>
#include <boost/units/systems/si/amount.hpp>
#include <boost/units/systems/si/angular_acceleration.hpp>
#include <boost/units/systems/si/angular_momentum.hpp>
#include <boost/units/systems/si/angular_velocity.hpp>
#include <boost/units/systems/si/area.hpp>
#include <boost/units/systems/si/capacitance.hpp>
#include <boost/units/systems/si/catalytic_activity.hpp>
#include <boost/units/systems/si/conductance.hpp>
#include <boost/units/systems/si/conductivity.hpp>
#include <boost/units/systems/si/current.hpp>
#include <boost/units/systems/si/dimensionless.hpp>
#include <boost/units/systems/si/dose_equivalent.hpp>
#include <boost/units/systems/si/dynamic_viscosity.hpp>
#include <boost/units/systems/si/electric_charge.hpp>
#include <boost/units/systems/si/electric_potential.hpp>
#include <boost/units/systems/si/energy.hpp>
#include <boost/units/systems/si/force.hpp>
#include <boost/units/systems/si/frequency.hpp>
#include <boost/units/systems/si/illuminance.hpp>
#include <boost/units/systems/si/impedance.hpp>
#include <boost/units/systems/si/inductance.hpp>
#include <boost/units/systems/si/kinematic_viscosity.hpp>
#include <boost/units/systems/si/length.hpp>
#include <boost/units/systems/si/luminous_flux.hpp>
#include <boost/units/systems/si/luminous_intensity.hpp>
#include <boost/units/systems/si/magnetic_field_intensity.hpp>
#include <boost/units/systems/si/magnetic_flux.hpp>
#include <boost/units/systems/si/magnetic_flux_density.hpp>
#include <boost/units/systems/si/mass.hpp>
#include <boost/units/systems/si/mass_density.hpp>
#include <boost/units/systems/si/moment_of_inertia.hpp>
#include <boost/units/systems/si/momentum.hpp>
#include <boost/units/systems/si/permeability.hpp>
#include <boost/units/systems/si/permittivity.hpp>
#include <boost/units/systems/si/plane_angle.hpp>
#include <boost/units/systems/si/power.hpp>
#include <boost/units/systems/si/pressure.hpp>
#include <boost/units/systems/si/reluctance.hpp>
#include <boost/units/systems/si/resistance.hpp>
#include <boost/units/systems/si/resistivity.hpp>
#include <boost/units/systems/si/solid_angle.hpp>
#include <boost/units/systems/si/surface_density.hpp>
#include <boost/units/systems/si/surface_tension.hpp>
#include <boost/units/systems/si/temperature.hpp>
#include <boost/units/systems/si/time.hpp>
#include <boost/units/systems/si/torque.hpp>
#include <boost/units/systems/si/velocity.hpp>
#include <boost/units/systems/si/volume.hpp>
#include <boost/units/systems/si/wavenumber.hpp>

#endif // BOOST_UNITS_SI_HPP

license: mit


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_ABSORBED_DOSE_HPP
#define BOOST_UNITS_SI_ABSORBED_DOSE_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/absorbed_dose.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<absorbed_dose_dimension,si::system>     absorbed_dose;

BOOST_UNITS_STATIC_CONSTANT(gray,absorbed_dose);
BOOST_UNITS_STATIC_CONSTANT(grays,absorbed_dose);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_ABSORBED_DOSE_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_ACCELERATION_HPP
#define BOOST_UNITS_SI_ACCELERATION_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/acceleration.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<acceleration_dimension,si::system>  acceleration;

BOOST_UNITS_STATIC_CONSTANT(meter_per_second_squared,acceleration);
BOOST_UNITS_STATIC_CONSTANT(meters_per_second_squared,acceleration);
BOOST_UNITS_STATIC_CONSTANT(metre_per_second_squared,acceleration);
BOOST_UNITS_STATIC_CONSTANT(metres_per_second_squared,acceleration);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_ACCELERATION_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_ACTION_HPP
#define BOOST_UNITS_SI_ACTION_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/action.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<action_dimension,si::system>    action;

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_ACTION_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_ACTIVITY_HPP
#define BOOST_UNITS_SI_ACTIVITY_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/activity.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<activity_dimension,si::system>  activity;

BOOST_UNITS_STATIC_CONSTANT(becquerel,activity);
BOOST_UNITS_STATIC_CONSTANT(becquerels,activity);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_ACTIVITY_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_AMOUNT_HPP
#define BOOST_UNITS_SI_AMOUNT_HPP

#include <boost/units/systems/si/base.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<amount_dimension,si::system>    amount;

BOOST_UNITS_STATIC_CONSTANT(mole,amount);
BOOST_UNITS_STATIC_CONSTANT(moles,amount);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_AMOUNT_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_ANGULAR_ACCELERATION_HPP
#define BOOST_UNITS_SI_ANGULAR_ACCELERATION_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/angular_acceleration.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<angular_acceleration_dimension,si::system>      angular_acceleration;

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_ANGULAR_ACCELERATION_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_ANGULAR_MOMENTUM_HPP
#define BOOST_UNITS_SI_ANGULAR_MOMENTUM_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/angular_momentum.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<angular_momentum_dimension,si::system>      angular_momentum;

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_ANGULAR_MOMENTUM_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_ANGULAR_VELOCITY_HPP
#define BOOST_UNITS_SI_ANGULAR_VELOCITY_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/angular_velocity.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<angular_velocity_dimension,si::system>      angular_velocity;

BOOST_UNITS_STATIC_CONSTANT(radian_per_second,angular_velocity);
BOOST_UNITS_STATIC_CONSTANT(radians_per_second,angular_velocity);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_ANGULAR_VELOCITY_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_AREA_HPP
#define BOOST_UNITS_SI_AREA_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/area.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<area_dimension,si::system>      area;

BOOST_UNITS_STATIC_CONSTANT(square_meter,area);
BOOST_UNITS_STATIC_CONSTANT(square_meters,area);
BOOST_UNITS_STATIC_CONSTANT(square_metre,area);
BOOST_UNITS_STATIC_CONSTANT(square_metres,area);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_AREA_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_BASE_HPP
#define BOOST_UNITS_SI_BASE_HPP

#include <string>

#include <boost/units/static_constant.hpp>
#include <boost/units/unit.hpp>
#include <boost/units/make_system.hpp>

#include <boost/units/base_units/si/meter.hpp>
#include <boost/units/base_units/si/kilogram.hpp>
#include <boost/units/base_units/si/second.hpp>
#include <boost/units/base_units/si/ampere.hpp>
#include <boost/units/base_units/si/kelvin.hpp>
#include <boost/units/base_units/si/mole.hpp>
#include <boost/units/base_units/si/candela.hpp>
#include <boost/units/base_units/angle/radian.hpp>
#include <boost/units/base_units/angle/steradian.hpp>

namespace boost {

namespace units {

namespace si {

/// placeholder class defining si unit system
typedef make_system<meter_base_unit,
                    kilogram_base_unit,
                    second_base_unit,
                    ampere_base_unit,
                    kelvin_base_unit,
                    mole_base_unit,
                    candela_base_unit,
                    angle::radian_base_unit,
                    angle::steradian_base_unit>::type system;

/// dimensionless si unit
typedef unit<dimensionless_type,system>         dimensionless;

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_BASE_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_CAPACITANCE_HPP
#define BOOST_UNITS_SI_CAPACITANCE_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/capacitance.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<capacitance_dimension,si::system>    capacitance;

BOOST_UNITS_STATIC_CONSTANT(farad,capacitance);
BOOST_UNITS_STATIC_CONSTANT(farads,capacitance);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_CAPACITANCE_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_CATALYTIC_ACTIVITY_HPP
#define BOOST_UNITS_SI_CATALYTIC_ACTIVITY_HPP

#include <boost/units/derived_dimension.hpp>
#include <boost/units/systems/si/base.hpp>

namespace boost {

namespace units {

namespace si {

/// catalytic activity : T^-1 A^1
typedef derived_dimension<time_base_dimension,-1,amount_base_dimension,1>::type                             catalytic_activity_dim;

typedef unit<si::catalytic_activity_dim,si::system>                                    catalytic_activity;

BOOST_UNITS_STATIC_CONSTANT(katal,catalytic_activity);
BOOST_UNITS_STATIC_CONSTANT(katals,catalytic_activity);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_CATALYTIC_ACTIVITY_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_CONDUCTANCE_HPP
#define BOOST_UNITS_SI_CONDUCTANCE_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/conductance.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<conductance_dimension,si::system>    conductance;

BOOST_UNITS_STATIC_CONSTANT(siemen,conductance);
BOOST_UNITS_STATIC_CONSTANT(siemens,conductance);
BOOST_UNITS_STATIC_CONSTANT(mho,conductance);
BOOST_UNITS_STATIC_CONSTANT(mhos,conductance);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_CONDUCTANCE_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_CONDUCTIVITY_HPP
#define BOOST_UNITS_SI_CONDUCTIVITY_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/conductivity.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<conductivity_dimension,si::system>    conductivity;

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_CONDUCTIVITY_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_CURRENT_HPP
#define BOOST_UNITS_SI_CURRENT_HPP

#include <boost/units/systems/si/base.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<current_dimension,si::system>   current;

BOOST_UNITS_STATIC_CONSTANT(ampere,current);
BOOST_UNITS_STATIC_CONSTANT(amperes,current);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_CURRENT_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_DIMENSIONLESS_HPP
#define BOOST_UNITS_SI_DIMENSIONLESS_HPP

#include <boost/units/systems/si/base.hpp>

namespace boost {

namespace units {

namespace si {

BOOST_UNITS_STATIC_CONSTANT(si_dimensionless,dimensionless);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_DIMENSIONLESS_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_DOSE_EQUIVALENT_HPP
#define BOOST_UNITS_SI_DOSE_EQUIVALENT_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/dose_equivalent.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<dose_equivalent_dimension,si::system>     dose_equivalent;

BOOST_UNITS_STATIC_CONSTANT(sievert,dose_equivalent);
BOOST_UNITS_STATIC_CONSTANT(sieverts,dose_equivalent);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_DOSE_EQUIVALENT_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_DYNAMIC_VISCOSITY_HPP
#define BOOST_UNITS_SI_DYNAMIC_VISCOSITY_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/dynamic_viscosity.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<dynamic_viscosity_dimension,si::system>     dynamic_viscosity;

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_DYNAMIC_VISCOSITY_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_ELECTRIC_CHARGE_HPP
#define BOOST_UNITS_SI_ELECTRIC_CHARGE_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/electric_charge.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<electric_charge_dimension,si::system>    electric_charge;

BOOST_UNITS_STATIC_CONSTANT(coulomb,electric_charge);
BOOST_UNITS_STATIC_CONSTANT(coulombs,electric_charge);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_ELECTRIC_CHARGE_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_ELECTRIC_POTENTIAL_HPP
#define BOOST_UNITS_SI_ELECTRIC_POTENTIAL_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/electric_potential.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<electric_potential_dimension,si::system>    electric_potential;

BOOST_UNITS_STATIC_CONSTANT(volt,electric_potential);
BOOST_UNITS_STATIC_CONSTANT(volts,electric_potential);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_ELECTRIC_POTENTIAL_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_ENERGY_HPP
#define BOOST_UNITS_SI_ENERGY_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/energy.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<energy_dimension,si::system>    energy;

BOOST_UNITS_STATIC_CONSTANT(joule,energy);
BOOST_UNITS_STATIC_CONSTANT(joules,energy);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_ENERGY_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_FORCE_HPP
#define BOOST_UNITS_SI_FORCE_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/force.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<force_dimension,si::system>     force;

BOOST_UNITS_STATIC_CONSTANT(newton,force);
BOOST_UNITS_STATIC_CONSTANT(newtons,force);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_FORCE_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_FREQUENCY_HPP
#define BOOST_UNITS_SI_FREQUENCY_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/frequency.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<frequency_dimension,si::system>     frequency;

BOOST_UNITS_STATIC_CONSTANT(hertz,frequency);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_FREQUENCY_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_ILLUMINANCE_HPP
#define BOOST_UNITS_SI_ILLUMINANCE_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/illuminance.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<illuminance_dimension,si::system>      illuminance;

BOOST_UNITS_STATIC_CONSTANT(lux,illuminance);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_ILLUMINANCE_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_IMPEDANCE_HPP
#define BOOST_UNITS_SI_IMPEDANCE_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/impedance.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<impedance_dimension,si::system>    impedance;

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_IMPEDANCE_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_INDUCTANCE_HPP
#define BOOST_UNITS_SI_INDUCTANCE_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/inductance.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<inductance_dimension,si::system>    inductance;

BOOST_UNITS_STATIC_CONSTANT(henry,inductance);
BOOST_UNITS_STATIC_CONSTANT(henrys,inductance);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_INDUCTANCE_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_IO_HPP
#define BOOST_UNITS_SI_IO_HPP

#include <boost/units/io.hpp>
#include <boost/units/reduce_unit.hpp>

#include <boost/units/systems/si.hpp>

namespace boost {

namespace units {

// gray and sievert are indistinguishable
inline std::string name_string(const reduce_unit<si::absorbed_dose>::type&) { return "gray"; }
inline std::string symbol_string(const reduce_unit<si::absorbed_dose>::type&) { return "Gy"; }

// activity and frequency are indistinguishable - would need a "decays" base unit
//inline std::string name_string(const si::activity&) { return "becquerel"; }
//inline std::string symbol_string(const si::activity&) { return "Bq"; }

inline std::string name_string(const reduce_unit<si::capacitance>::type&)   { return "farad"; }
inline std::string symbol_string(const reduce_unit<si::capacitance>::type&) { return "F"; }

inline std::string name_string(const reduce_unit<si::catalytic_activity>::type&) { return "katal"; }
inline std::string symbol_string(const reduce_unit<si::catalytic_activity>::type&) { return "kat"; }

inline std::string name_string(const reduce_unit<si::conductance>::type&) { return "siemen"; }
inline std::string symbol_string(const reduce_unit<si::conductance>::type&) { return "S"; }

// gray and sievert are indistinguishable
//inline std::string name_string(const si::dose_equivalent&) { return "sievert"; }
//inline std::string symbol_string(const si::dose_equivalent&) { return "Sv"; }

inline std::string name_string(const reduce_unit<si::electric_charge>::type&) { return "coulomb"; }
inline std::string symbol_string(const reduce_unit<si::electric_charge>::type&) { return "C"; }

inline std::string name_string(const reduce_unit<si::electric_potential>::type&) { return "volt"; }
inline std::string symbol_string(const reduce_unit<si::electric_potential>::type&) { return "V"; }

inline std::string name_string(const reduce_unit<si::energy>::type&) { return "joule"; }
inline std::string symbol_string(const reduce_unit<si::energy>::type&) { return "J"; }

inline std::string name_string(const reduce_unit<si::force>::type&) { return "newton"; }
inline std::string symbol_string(const reduce_unit<si::force>::type&) { return "N"; }

inline std::string name_string(const reduce_unit<si::frequency>::type&) { return "hertz"; }
inline std::string symbol_string(const reduce_unit<si::frequency>::type&) { return "Hz"; }

inline std::string name_string(const reduce_unit<si::illuminance>::type&) { return "lux"; }
inline std::string symbol_string(const reduce_unit<si::illuminance>::type&) { return "lx"; }

inline std::string name_string(const reduce_unit<si::inductance>::type&) { return "henry"; }
inline std::string symbol_string(const reduce_unit<si::inductance>::type&) { return "H"; }

inline std::string name_string(const reduce_unit<si::luminous_flux>::type&) { return "lumen"; }
inline std::string symbol_string(const reduce_unit<si::luminous_flux>::type&) { return "lm"; }

inline std::string name_string(const reduce_unit<si::magnetic_flux>::type&) { return "weber"; }
inline std::string symbol_string(const reduce_unit<si::magnetic_flux>::type&) { return "Wb"; }

inline std::string name_string(const reduce_unit<si::magnetic_flux_density>::type&) { return "tesla"; }
inline std::string symbol_string(const reduce_unit<si::magnetic_flux_density>::type&) { return "T"; }

inline std::string name_string(const reduce_unit<si::power>::type&) { return "watt"; }
inline std::string symbol_string(const reduce_unit<si::power>::type&) { return "W"; }

inline std::string name_string(const reduce_unit<si::pressure>::type&) { return "pascal"; }
inline std::string symbol_string(const reduce_unit<si::pressure>::type&) { return "Pa"; }

inline std::string name_string(const reduce_unit<si::resistance>::type&) { return "ohm"; }
inline std::string symbol_string(const reduce_unit<si::resistance>::type&) { return "Ohm"; }

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_IO_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_KINEMATIC_VISCOSITY_HPP
#define BOOST_UNITS_SI_KINEMATIC_VISCOSITY_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/kinematic_viscosity.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<kinematic_viscosity_dimension,si::system>     kinematic_viscosity;

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_KINEMATIC_VISCOSITY_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_LENGTH_HPP
#define BOOST_UNITS_SI_LENGTH_HPP

#include <boost/units/systems/si/base.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<length_dimension,si::system>    length;

BOOST_UNITS_STATIC_CONSTANT(meter,length);
BOOST_UNITS_STATIC_CONSTANT(meters,length);
BOOST_UNITS_STATIC_CONSTANT(metre,length);
BOOST_UNITS_STATIC_CONSTANT(metres,length);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_LENGTH_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_LUMINOUS_FLUX_HPP
#define BOOST_UNITS_SI_LUMINOUS_FLUX_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/luminous_flux.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<luminous_flux_dimension,si::system>      luminous_flux;

BOOST_UNITS_STATIC_CONSTANT(lumen,luminous_flux);
BOOST_UNITS_STATIC_CONSTANT(lumens,luminous_flux);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_LUMINOUS_FLUX_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_LUMINOUS_INTENSITY_HPP
#define BOOST_UNITS_SI_LUMINOUS_INTENSITY_HPP

#include <boost/units/systems/si/base.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<luminous_intensity_dimension,si::system>      luminous_intensity;

BOOST_UNITS_STATIC_CONSTANT(candela,luminous_intensity);
BOOST_UNITS_STATIC_CONSTANT(candelas,luminous_intensity);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_LUMINOUS_INTENSITY_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_MAGNETIC_FIELD_INTENSITY_HPP
#define BOOST_UNITS_SI_MAGNETIC_FIELD_INTENSITY_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/magnetic_field_intensity.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<magnetic_field_intensity_dimension,si::system>    magnetic_field_intensity;

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_MAGNETIC_FIELD_INTENSITY_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_MAGNETIC_FLUX_HPP
#define BOOST_UNITS_SI_MAGNETIC_FLUX_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/magnetic_flux.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<magnetic_flux_dimension,si::system>    magnetic_flux;

BOOST_UNITS_STATIC_CONSTANT(weber,magnetic_flux);
BOOST_UNITS_STATIC_CONSTANT(webers,magnetic_flux);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_MAGNETIC_FLUX_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_MAGNETIC_FLUX_DENSITY_HPP
#define BOOST_UNITS_SI_MAGNETIC_FLUX_DENSITY_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/magnetic_flux_density.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<magnetic_flux_density_dimension,si::system>    magnetic_flux_density;

BOOST_UNITS_STATIC_CONSTANT(tesla,magnetic_flux_density);
BOOST_UNITS_STATIC_CONSTANT(teslas,magnetic_flux_density);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_MAGNETIC_FLUX_DENSITY_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_MASS_HPP
#define BOOST_UNITS_SI_MASS_HPP

#include <boost/units/systems/si/base.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<mass_dimension,si::system>      mass;

BOOST_UNITS_STATIC_CONSTANT(kilogram,mass);
BOOST_UNITS_STATIC_CONSTANT(kilograms,mass);
BOOST_UNITS_STATIC_CONSTANT(kilogramme,mass);
BOOST_UNITS_STATIC_CONSTANT(kilogrammes,mass);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_MASS_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_MASS_DENSITY_HPP
#define BOOST_UNITS_SI_MASS_DENSITY_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/mass_density.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<mass_density_dimension,si::system>  mass_density;

BOOST_UNITS_STATIC_CONSTANT(kilogram_per_cubic_meter,mass_density);
BOOST_UNITS_STATIC_CONSTANT(kilograms_per_cubic_meter,mass_density);
BOOST_UNITS_STATIC_CONSTANT(kilogramme_per_cubic_metre,mass_density);
BOOST_UNITS_STATIC_CONSTANT(kilogrammes_per_cubic_metre,mass_density);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_MASS_DENSITY_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_MOMENT_OF_INERTIA_HPP
#define BOOST_UNITS_SI_MOMENT_OF_INERTIA_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/moment_of_inertia.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<moment_of_inertia_dimension,si::system>      moment_of_inertia;

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_MOMENT_OF_INERTIA_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_MOMENTUM_HPP
#define BOOST_UNITS_SI_MOMENTUM_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/momentum.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<momentum_dimension,si::system>  momentum;

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_MOMENTUM_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_PERMEABILITY_HPP
#define BOOST_UNITS_SI_PERMEABILITY_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/permeability.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<permeability_dimension,si::system>    permeability;

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_PERMEABILITY_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_PERMITTIVITY_HPP
#define BOOST_UNITS_SI_PERMITTIVITY_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/permittivity.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<permittivity_dimension,si::system>    permittivity;

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_PERMITTIVITY_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_PLANE_ANGLE_HPP
#define BOOST_UNITS_SI_PLANE_ANGLE_HPP

#include <boost/units/systems/si/base.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<plane_angle_dimension,si::system>      plane_angle;

BOOST_UNITS_STATIC_CONSTANT(radian,plane_angle);
BOOST_UNITS_STATIC_CONSTANT(radians,plane_angle);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_PLANE_ANGLE_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_POWER_HPP
#define BOOST_UNITS_SI_POWER_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/power.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<power_dimension,si::system>     power;

BOOST_UNITS_STATIC_CONSTANT(watt,power);
BOOST_UNITS_STATIC_CONSTANT(watts,power);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_POWER_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_PRESSURE_HPP
#define BOOST_UNITS_SI_PRESSURE_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/pressure.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<pressure_dimension,si::system>      pressure;

// windef.h #defines pascal on Metrowerks compilers
#if defined(__MWERKS__)
   #if !__option(only_std_keywords)
       #define BOOST_UNITS_NO_PASCAL 1
   #elif defined(pascal)
       #define BOOST_UNITS_NO_PASCAL 1
   #endif
#elif defined(pascal)
   #define BOOST_UNITS_NO_PASCAL 1
#elif BOOST_MSVC
   #define BOOST_UNITS_NO_PASCAL 1
#endif

#ifndef BOOST_UNITS_NO_PASCAL
BOOST_UNITS_STATIC_CONSTANT(pascal,pressure);
#endif
BOOST_UNITS_STATIC_CONSTANT(pascals,pressure);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_PRESSURE_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_RELUCTANCE_HPP
#define BOOST_UNITS_SI_RELUCTANCE_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/reluctance.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<reluctance_dimension,si::system>    reluctance;

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_RELUCTANCE_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_RESISTANCE_HPP
#define BOOST_UNITS_SI_RESISTANCE_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/resistance.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<resistance_dimension,si::system>    resistance;

BOOST_UNITS_STATIC_CONSTANT(ohm,resistance);
BOOST_UNITS_STATIC_CONSTANT(ohms,resistance);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_RESISTANCE_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_RESISTIVITY_HPP
#define BOOST_UNITS_SI_RESISTIVITY_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/resistivity.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<resistivity_dimension,si::system>    resistivity;

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_RESISTIVITY_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_SOLID_ANGLE_HPP
#define BOOST_UNITS_SI_SOLID_ANGLE_HPP

#include <boost/units/systems/si/base.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<solid_angle_dimension,si::system>      solid_angle;

BOOST_UNITS_STATIC_CONSTANT(steradian,solid_angle);
BOOST_UNITS_STATIC_CONSTANT(steradians,solid_angle);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_SOLID_ANGLE_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_SURFACE_DENSITY_HPP
#define BOOST_UNITS_SI_SURFACE_DENSITY_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/surface_density.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<surface_density_dimension,si::system>  surface_density;

BOOST_UNITS_STATIC_CONSTANT(kilogram_per_square_meter,surface_density);
BOOST_UNITS_STATIC_CONSTANT(kilograms_per_square_meter,surface_density);
BOOST_UNITS_STATIC_CONSTANT(kilogramme_per_square_metre,surface_density);
BOOST_UNITS_STATIC_CONSTANT(kilogrammes_per_square_metre,surface_density);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_SURFACE_DENSITY_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_SURFACE_TENSION_HPP
#define BOOST_UNITS_SI_SURFACE_TENSION_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/surface_tension.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<surface_tension_dimension,si::system>     surface_tension;

BOOST_UNITS_STATIC_CONSTANT(newton_per_meter,surface_tension);
BOOST_UNITS_STATIC_CONSTANT(newtons_per_meter,surface_tension);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_SURFACE_TENSION_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_TEMPERATURE_HPP
#define BOOST_UNITS_SI_TEMPERATURE_HPP

#include <boost/units/systems/si/base.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<temperature_dimension,si::system>   temperature;

BOOST_UNITS_STATIC_CONSTANT(kelvin,temperature);
BOOST_UNITS_STATIC_CONSTANT(kelvins,temperature);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_TEMPERATURE_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_TIME_HPP
#define BOOST_UNITS_SI_TIME_HPP

#include <boost/units/systems/si/base.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<time_dimension,si::system>      time;

BOOST_UNITS_STATIC_CONSTANT(second,time);
BOOST_UNITS_STATIC_CONSTANT(seconds,time);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_TIME_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_TORQUE_HPP
#define BOOST_UNITS_SI_TORQUE_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/torque.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<torque_dimension,si::system>     torque;

BOOST_UNITS_STATIC_CONSTANT(newton_meter,torque);
BOOST_UNITS_STATIC_CONSTANT(newton_meters,torque);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_TORQUE_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_VELOCITY_HPP
#define BOOST_UNITS_SI_VELOCITY_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/velocity.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<velocity_dimension,si::system>      velocity;

BOOST_UNITS_STATIC_CONSTANT(meter_per_second,velocity);
BOOST_UNITS_STATIC_CONSTANT(meters_per_second,velocity);
BOOST_UNITS_STATIC_CONSTANT(metre_per_second,velocity);
BOOST_UNITS_STATIC_CONSTANT(metres_per_second,velocity);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_VELOCITY_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_VOLUME_HPP
#define BOOST_UNITS_SI_VOLUME_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/volume.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<volume_dimension,si::system>    volume;

BOOST_UNITS_STATIC_CONSTANT(cubic_meter,volume);
BOOST_UNITS_STATIC_CONSTANT(cubic_meters,volume);
BOOST_UNITS_STATIC_CONSTANT(cubic_metre,volume);
BOOST_UNITS_STATIC_CONSTANT(cubic_metres,volume);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_VOLUME_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_WAVENUMBER_HPP
#define BOOST_UNITS_SI_WAVENUMBER_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/wavenumber.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<wavenumber_dimension,si::system>    wavenumber;

BOOST_UNITS_STATIC_CONSTANT(reciprocal_meter,wavenumber);
BOOST_UNITS_STATIC_CONSTANT(reciprocal_meters,wavenumber);
BOOST_UNITS_STATIC_CONSTANT(reciprocal_metre,wavenumber);
BOOST_UNITS_STATIC_CONSTANT(reciprocal_metres,wavenumber);

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_WAVENUMBER_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_UNIT_HPP
#define BOOST_UNITS_UNIT_HPP

#include <boost/static_assert.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/type_traits/is_same.hpp>

#include <boost/units/config.hpp>
#include <boost/units/dimension.hpp>
#include <boost/units/operators.hpp>
#include <boost/units/units_fwd.hpp>
#include <boost/units/homogeneous_system.hpp>
#include <boost/units/heterogeneous_system.hpp>
#include <boost/units/is_dimension_list.hpp>
#include <boost/units/reduce_unit.hpp>
#include <boost/units/static_rational.hpp>

namespace boost {

namespace units {

/// class representing a model-dependent unit with no associated value

/// (e.g. meters, Kelvin, feet, etc...)
template<class Dim,class System, class Enable>
class unit
{
    public:
        typedef unit<Dim, System>   unit_type;
        typedef unit<Dim,System>    this_type;
        typedef Dim                 dimension_type;
        typedef System              system_type;

        unit() { }
        unit(const this_type&) { }
        //~unit() { }

        this_type& operator=(const this_type&) { return *this; }

        // sun will ignore errors resulting from templates
        // instantiated in the return type of a function.
        // Make sure that we get an error anyway by putting.
        // the check in the destructor.
        #ifdef __SUNPRO_CC
        ~unit() {
            BOOST_MPL_ASSERT((detail::check_system<System, Dim>));
            BOOST_MPL_ASSERT((is_dimension_list<Dim>));
        }
        #else
    private:
        BOOST_MPL_ASSERT((detail::check_system<System, Dim>));
        BOOST_MPL_ASSERT((is_dimension_list<Dim>));
        #endif
};

}

}

#if BOOST_UNITS_HAS_BOOST_TYPEOF

#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()

BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::unit, 2)

#endif

namespace boost {

namespace units {

/// Returns a unique type for every unit.
template<class Dim, class System>
struct reduce_unit<unit<Dim, System> >
{
    typedef unit<
        Dim,
        typename detail::make_heterogeneous_system<
            Dim,
            System
        >::type
    > type;
};

/// INTERNAL ONLY
template<class S1,class S2>
struct is_implicitly_convertible :
    boost::is_same<typename reduce_unit<S1>::type, typename reduce_unit<S2>::type>
{ };

/// unit unary plus typeof helper
/// INTERNAL ONLY
template<class Dim,class System>
struct unary_plus_typeof_helper< unit<Dim,System> >
{
    typedef unit<Dim,System>    type;
};

/// unit unary minus typeof helper
/// INTERNAL ONLY
template<class Dim,class System>
struct unary_minus_typeof_helper< unit<Dim,System> >
{
    typedef unit<Dim,System>    type;
};

/// unit add typeof helper
/// INTERNAL ONLY
template<class Dim,
         class System>
struct add_typeof_helper< unit<Dim,System>,unit<Dim,System> >
{
    typedef unit<Dim,System> type;
};

/// unit subtract typeof helper
/// INTERNAL ONLY
template<class Dim,
         class System>
struct subtract_typeof_helper< unit<Dim,System>,unit<Dim,System> >
{
    typedef unit<Dim,System>   type;
};

/// unit multiply typeof helper for two identical homogeneous systems
/// INTERNAL ONLY
template<class Dim1,
         class Dim2,
         class System>
struct multiply_typeof_helper< unit<Dim1,homogeneous_system<System> >,
                               unit<Dim2,homogeneous_system<System> > >
{
    typedef unit<typename mpl::times<Dim1,Dim2>::type,homogeneous_system<System> >    type;
};

/// unit multiply typeof helper for two different homogeneous systems
/// INTERNAL ONLY
template<class Dim1,
         class Dim2,
         class System1,
         class System2>
struct multiply_typeof_helper< unit<Dim1,homogeneous_system<System1> >,
                               unit<Dim2,homogeneous_system<System2> > >
{
    typedef unit<
        typename mpl::times<Dim1,Dim2>::type,
        typename detail::multiply_systems<
            typename detail::make_heterogeneous_system<Dim1, System1>::type,
            typename detail::make_heterogeneous_system<Dim2, System2>::type
        >::type
    > type;
};

/// unit multiply typeof helper for a heterogeneous and a homogeneous system
/// INTERNAL ONLY
template<class Dim1,
         class Dim2,
         class System1,
         class System2>
struct multiply_typeof_helper< unit<Dim1,heterogeneous_system<System1> >,
                               unit<Dim2,homogeneous_system<System2> > >
{
    typedef unit<
        typename mpl::times<Dim1,Dim2>::type,
        typename detail::multiply_systems<
            heterogeneous_system<System1>,
            typename detail::make_heterogeneous_system<Dim2, System2>::type
        >::type
    > type;
};

/// unit multiply typeof helper for a homogeneous and a heterogeneous system
/// INTERNAL ONLY
template<class Dim1,
         class Dim2,
         class System1,
         class System2>
struct multiply_typeof_helper< unit<Dim1,homogeneous_system<System1> >,
                               unit<Dim2,heterogeneous_system<System2> > >
{
    typedef unit<
        typename mpl::times<Dim1,Dim2>::type,
        typename detail::multiply_systems<
            typename detail::make_heterogeneous_system<Dim1, System1>::type,
            heterogeneous_system<System2>
        >::type
    > type;
};

/// unit multiply typeof helper for two heterogeneous systems
/// INTERNAL ONLY
template<class Dim1,
         class Dim2,
         class System1,
         class System2>
struct multiply_typeof_helper< unit<Dim1,heterogeneous_system<System1> >,
                               unit<Dim2,heterogeneous_system<System2> > >
{
    typedef unit<
        typename mpl::times<Dim1,Dim2>::type,
        typename detail::multiply_systems<
            heterogeneous_system<System1>,
            heterogeneous_system<System2>
        >::type
    > type;
};

/// unit divide typeof helper for two identical homogeneous systems
/// INTERNAL ONLY
template<class Dim1,
         class Dim2,
         class System>
struct divide_typeof_helper< unit<Dim1,homogeneous_system<System> >,
                             unit<Dim2,homogeneous_system<System> > >
{
    typedef unit<typename mpl::divides<Dim1,Dim2>::type,homogeneous_system<System> >    type;
};

/// unit divide typeof helper for two different homogeneous systems
/// INTERNAL ONLY
template<class Dim1,
         class Dim2,
         class System1,
         class System2>
struct divide_typeof_helper< unit<Dim1,homogeneous_system<System1> >,
                             unit<Dim2,homogeneous_system<System2> > >
{
    typedef unit<
        typename mpl::divides<Dim1,Dim2>::type,
        typename detail::divide_systems<
            typename detail::make_heterogeneous_system<Dim1, System1>::type,
            typename detail::make_heterogeneous_system<Dim2, System2>::type
        >::type
    > type;
};

/// unit divide typeof helper for a heterogeneous and a homogeneous system
/// INTERNAL ONLY
template<class Dim1,
         class Dim2,
         class System1,
         class System2>
struct divide_typeof_helper< unit<Dim1,heterogeneous_system<System1> >,
                             unit<Dim2,homogeneous_system<System2> > >
{
    typedef unit<
        typename mpl::divides<Dim1,Dim2>::type,
        typename detail::divide_systems<
            heterogeneous_system<System1>,
            typename detail::make_heterogeneous_system<Dim2, System2>::type
        >::type
    > type;
};

/// unit divide typeof helper for a homogeneous and a heterogeneous system
/// INTERNAL ONLY
template<class Dim1,
         class Dim2,
         class System1,
         class System2>
struct divide_typeof_helper< unit<Dim1,homogeneous_system<System1> >,
                             unit<Dim2,heterogeneous_system<System2> > >
{
    typedef unit<
        typename mpl::divides<Dim1,Dim2>::type,
        typename detail::divide_systems<
            typename detail::make_heterogeneous_system<Dim1, System1>::type,
            heterogeneous_system<System2>
        >::type
    > type;
};

/// unit divide typeof helper for two heterogeneous systems
/// INTERNAL ONLY
template<class Dim1,
         class Dim2,
         class System1,
         class System2>
struct divide_typeof_helper< unit<Dim1,heterogeneous_system<System1> >,
                             unit<Dim2,heterogeneous_system<System2> > >
{
    typedef unit<
        typename mpl::divides<Dim1,Dim2>::type,
        typename detail::divide_systems<
            heterogeneous_system<System1>,
            heterogeneous_system<System2>
        >::type
    > type;
};

/// raise unit to a @c static_rational power
template<class Dim,class System,long N,long D>
struct power_typeof_helper<unit<Dim,System>,static_rational<N,D> >
{
    typedef unit<typename static_power<Dim,static_rational<N,D> >::type,typename static_power<System, static_rational<N,D> >::type>     type;

    static type value(const unit<Dim,System>&)
    {
        return type();
    }
};

/// take the @c static_rational root of a unit
template<class Dim,class System,long N,long D>
struct root_typeof_helper<unit<Dim,System>,static_rational<N,D> >
{
    typedef unit<typename static_root<Dim,static_rational<N,D> >::type,typename static_root<System, static_rational<N,D> >::type>      type;

    static type value(const unit<Dim,System>&)
    {
        return type();
    }
};

/// unit runtime unary plus
template<class Dim,class System>
typename unary_plus_typeof_helper< unit<Dim,System> >::type
operator+(const unit<Dim,System>&)
{
    typedef typename unary_plus_typeof_helper< unit<Dim,System> >::type type;

    return type();
}

/// unit runtime unary minus
template<class Dim,class System>
typename unary_minus_typeof_helper< unit<Dim,System> >::type
operator-(const unit<Dim,System>&)
{
    typedef typename unary_minus_typeof_helper< unit<Dim,System> >::type    type;

    return type();
}

/// runtime add two units
template<class Dim1,
         class Dim2,
         class System1,
         class System2>
typename add_typeof_helper< unit<Dim1,System1>,
                            unit<Dim2,System2> >::type
operator+(const unit<Dim1,System1>&,const unit<Dim2,System2>&)
{
    BOOST_STATIC_ASSERT((boost::is_same<System1,System2>::value == true));

    typedef System1                                                     system_type;
    typedef typename add_typeof_helper< unit<Dim1,system_type>,
                                        unit<Dim2,system_type> >::type  type;

    return type();
}

/// runtime subtract two units
template<class Dim1,
         class Dim2,
         class System1,
         class System2>
typename subtract_typeof_helper< unit<Dim1,System1>,
                                 unit<Dim2,System2> >::type
operator-(const unit<Dim1,System1>&,const unit<Dim2,System2>&)
{
    BOOST_STATIC_ASSERT((boost::is_same<System1,System2>::value == true));

    typedef System1                                                         system_type;
    typedef typename subtract_typeof_helper< unit<Dim1,system_type>,
                                             unit<Dim2,system_type> >::type type;

    return type();
}

/// runtime multiply two units
template<class Dim1,
         class Dim2,
         class System1,
         class System2>
typename multiply_typeof_helper< unit<Dim1,System1>,
                                 unit<Dim2,System2> >::type
operator*(const unit<Dim1,System1>&,const unit<Dim2,System2>&)
{
    typedef typename multiply_typeof_helper< unit<Dim1,System1>,
                                             unit<Dim2,System2> >::type type;

    return type();
}

/// runtime divide two units
template<class Dim1,
         class Dim2,
         class System1,
         class System2>
typename divide_typeof_helper< unit<Dim1,System1>,
                               unit<Dim2,System2> >::type
operator/(const unit<Dim1,System1>&,const unit<Dim2,System2>&)
{
    typedef typename divide_typeof_helper< unit<Dim1,System1>,
                                           unit<Dim2,System2> >::type   type;

    return type();
}

/// unit runtime @c operator==
template<class Dim1,
         class Dim2,
         class System1,
         class System2>
inline
bool
operator==(const unit<Dim1,System1>&,const unit<Dim2,System2>&)
{
    return boost::is_same<typename reduce_unit<unit<Dim1,System1> >::type, typename reduce_unit<unit<Dim2,System2> >::type>::value;
}

/// unit runtime @c operator!=
template<class Dim1,
         class Dim2,
         class System1,
         class System2>
inline
bool
operator!=(const unit<Dim1,System1>&,const unit<Dim2,System2>&)
{
    return !boost::is_same<typename reduce_unit<unit<Dim1,System1> >::type, typename reduce_unit<unit<Dim2,System2> >::type>::value;
}

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_UNIT_HPP


code:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_UNITS_FWD_HPP
#define BOOST_UNITS_UNITS_FWD_HPP

///
/// \file
/// \brief Forward declarations of library components.
/// \details Forward declarations of units library - dimensions, systems, quantity and string components.
///

#ifndef BOOST_UNITS_DOXYGEN

#include <string>

namespace boost {

namespace units {

template<typename T,typename V> struct dim;
template<typename T> struct is_dim;

struct dimensionless_type;
template<class Item,class Next> struct list;
template<typename Seq> struct make_dimension_list;

template<class T> struct is_dimensionless;
template<class S1,class S2> struct is_implicitly_convertible;
template<class T> struct get_dimension;
template<class T> struct get_system;

template<class Y> class absolute;

template<class Dim,class System, class Enable=void> class unit;

template<long Base, class Exponent> struct scale;

template<class BaseUnitTag> struct base_unit_info;
template<class System> struct dimensionless_unit;
template<class T> struct is_unit;
template<class T,class Dim> struct is_unit_of_dimension;
template<class T,class System> struct is_unit_of_system;

template<class Unit,class Y = double> class quantity;

template<class System,class Y> struct dimensionless_quantity;
template<class T> struct is_quantity;
template<class T,class Dim> struct is_quantity_of_dimension;
template<class T,class System> struct is_quantity_of_system;

template<class From,class To> struct conversion_helper;

template<class T> std::string to_string(const T&);
template<class T> std::string name_string(const T&);
template<class T> std::string symbol_string(const T&);
template<class T> std::string raw_string(const T&);
template<class T> std::string typename_string(const T&);

} // namespace units

} // namespace boost

#endif

#endif // BOOST_UNITS_UNITS_FWD_HPP