/usr/include/boost/units
NameSizeModeActions
base_units/-0755rm
detail/-0755rm
physical_dimensions/-0755rm
systems/-0755rm
absolute.hpp55400644editdlrm
base_dimension.hpp36920644editdlrm
base_unit.hpp41320644editdlrm
cmath.hpp205920644editdlrm
config.hpp28290644editdlrm
conversion.hpp95180644editdlrm
derived_dimension.hpp64650644editdlrm
dim.hpp47450644editdlrm
dimension.hpp44030644editdlrm
dimensionless_quantity.hpp9950644editdlrm
dimensionless_type.hpp13150644editdlrm
dimensionless_unit.hpp9570644editdlrm
get_dimension.hpp12210644editdlrm
get_system.hpp11650644editdlrm
heterogeneous_system.hpp122580644editdlrm
homogeneous_system.hpp23990644editdlrm
io.hpp324700644editdlrm
is_dim.hpp8850644editdlrm
is_dimensionless.hpp11070644editdlrm
is_dimensionless_quantity.hpp9360644editdlrm
is_dimensionless_unit.hpp9050644editdlrm
is_dimension_list.hpp10570644editdlrm
is_quantity.hpp9160644editdlrm
is_quantity_of_dimension.hpp11150644editdlrm
is_quantity_of_system.hpp10970644editdlrm
is_unit.hpp8790644editdlrm
is_unit_of_dimension.hpp11380644editdlrm
is_unit_of_system.hpp11270644editdlrm
lambda.hpp268410644editdlrm
limits.hpp43450644editdlrm
make_scaled_unit.hpp18170644editdlrm
make_system.hpp49140644editdlrm
operators.hpp62870644editdlrm
physical_dimensions.hpp45320644editdlrm
pow.hpp30330644editdlrm
quantity.hpp418600644editdlrm
reduce_unit.hpp8680644editdlrm
scale.hpp50620644editdlrm
scaled_base_unit.hpp36430644editdlrm
static_constant.hpp24250644editdlrm
static_rational.hpp104350644editdlrm
unit.hpp134490644editdlrm
units_fwd.hpp21910644editdlrm
Edit: /usr/include/boost/units/dim.hpp (4745B)
// 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) 2007-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_DIM_HPP #define BOOST_UNITS_DIM_HPP #include #include #include #include #include #include /// \file dim.hpp /// \brief Handling of fundamental dimension/exponent pairs. namespace boost { namespace units { namespace detail { struct dim_tag { }; } /// \brief Dimension tag/exponent pair for a single fundamental dimension. /// /// \details /// The dim class represents a single dimension tag/dimension exponent pair. /// That is, @c dim is a pair where @c tag_type represents the /// fundamental dimension being represented and @c value_type represents the /// exponent of that fundamental dimension as a @c static_rational. @c tag_type must /// be a derived from a specialization of @c base_dimension. /// Specialization of the following Boost.MPL metafunctions are provided /// /// - @c mpl::plus for two @c dims /// - @c mpl::minus for two @c dims /// - @c mpl::negate for a @c dim /// /// These metafunctions all operate on the exponent, and require /// that the @c dim operands have the same base dimension tag. /// In addition, multiplication and division by @c static_rational /// is supported. /// /// - @c mpl::times for a @c static_rational and a @c dim in either order /// - @c mpl::divides for a @c static_rational and a @c dim in either order /// /// These metafunctions likewise operate on the exponent only. template struct dim { typedef dim type; typedef detail::dim_tag tag; typedef T tag_type; typedef V value_type; }; } // namespace units } // namespace boost #if BOOST_UNITS_HAS_BOOST_TYPEOF #include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::dim, 2) #endif #ifndef BOOST_UNITS_DOXYGEN namespace boost { namespace mpl { // define MPL operators acting on dim template<> struct plus_impl { template struct apply { BOOST_STATIC_ASSERT((boost::is_same::value == true)); typedef boost::units::dim::type> type; }; }; template<> struct minus_impl { template struct apply { BOOST_STATIC_ASSERT((boost::is_same::value == true)); typedef boost::units::dim::type> type; }; }; template<> struct times_impl { template struct apply { typedef boost::units::dim::type> type; }; }; template<> struct times_impl { template struct apply { typedef boost::units::dim::type> type; }; }; template<> struct divides_impl { template struct apply { typedef boost::units::dim::type> type; }; }; template<> struct divides_impl { template struct apply { typedef boost::units::dim::type> type; }; }; template<> struct negate_impl { template struct apply { typedef boost::units::dim::type> type; }; }; } // namespace mpl } // namespace boost #endif #endif // BOOST_UNITS_DIM_HPP