1 // Boost.Units - A C++ library for zero-overhead dimensional analysis and
2 // unit/quantity manipulation and conversion
4 // Copyright (C) 2003-2008 Matthias Christian Schabel
5 // Copyright (C) 2007-2008 Steven Watanabe
7 // Distributed under the Boost Software License, Version 1.0. (See
8 // accompanying file LICENSE_1_0.txt or copy at
9 // http://www.boost.org/LICENSE_1_0.txt)
14 \brief test_unscale.cpp
17 Test that unscale works in an attempt to isolate the sun problems.
24 #include <boost/units/reduce_unit.hpp>
25 #include <boost/units/detail/unscale.hpp>
26 #include <boost/units/base_units/temperature/fahrenheit.hpp>
28 #include <boost/mpl/assert.hpp>
29 #include <boost/type_traits/is_same.hpp>
31 BOOST_MPL_ASSERT((boost::is_same
<boost::units::unscale
<boost::units::temperature::fahrenheit_base_unit::unit_type::system_type
>::type
,
32 boost::units::temperature::fahrenheit_base_unit::unit_type::system_type
>));
34 BOOST_MPL_ASSERT((boost::is_same
<boost::units::unscale
<boost::units::temperature::fahrenheit_base_unit::unit_type
>::type
,
35 boost::units::temperature::fahrenheit_base_unit::unit_type
>));
37 BOOST_MPL_ASSERT((boost::is_same
<boost::units::unscale
<boost::units::reduce_unit
<boost::units::temperature::fahrenheit_base_unit::unit_type
>::type
>::type
,
38 boost::units::temperature::fahrenheit_base_unit::unit_type
>));
40 BOOST_MPL_ASSERT((boost::is_same
<
41 boost::units::temperature::fahrenheit_base_unit::unit_type
,
43 boost::units::temperature_dimension
,
44 boost::units::heterogeneous_system
<
45 boost::units::heterogeneous_system_impl
<
47 boost::units::heterogeneous_system_dim
<
48 boost::units::temperature::fahrenheit_base_unit
,
49 boost::units::static_rational
<1>
51 boost::units::dimensionless_type
53 boost::units::temperature_dimension
,
54 boost::units::dimensionless_type