Edit: /usr/include/boost/units/homogeneous_system.hpp (2399B)
// 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_HOMOGENEOUS_SYSTEM_HPP_INCLUDED
#define BOOST_UNITS_HOMOGENEOUS_SYSTEM_HPP_INCLUDED
#include
#include
#include
#ifdef BOOST_UNITS_CHECK_HOMOGENEOUS_UNITS
#include
#include
#include
#endif
namespace boost {
namespace units {
/// A system that can uniquely represent any unit
/// which can be composed from a linearly independent set
/// of base units. It is safe to rebind a unit with
/// such a system to different dimensions.
///
/// Do not construct this template directly. Use
/// make_system instead.
template
struct homogeneous_system {
/// INTERNAL ONLY
typedef L type;
};
template
struct static_power;
template
struct static_root;
/// INTERNAL ONLY
template
struct static_power, static_rational >
{
typedef homogeneous_system type;
};
/// INTERNAL ONLY
template
struct static_root, static_rational >
{
typedef homogeneous_system type;
};
namespace detail {
template
struct check_system;
#ifdef BOOST_UNITS_CHECK_HOMOGENEOUS_UNITS
template
struct check_system, Dimensions> :
boost::mpl::not_<
boost::is_same<
typename calculate_base_unit_exponents<
L,
Dimensions
>::type,
inconsistent
>
> {};
#else
template
struct check_system, Dimensions> : mpl::true_ {};
#endif
} // namespace detail
} // namespace units
} // namespace boost
#if BOOST_UNITS_HAS_BOOST_TYPEOF
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::homogeneous_system, (class))
#endif
#endif