1 // Boost.Units - A C++ library for zero-overhead dimensional analysis and 2 // unit/quantity manipulation and conversion 3 // 4 // Copyright (C) 2003-2008 Matthias Christian Schabel 5 // Copyright (C) 2007-2008 Steven Watanabe 6 // 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) 10 11 /** 12 \file 13 14 \brief test_unscale.cpp 15 16 \details 17 Test that unscale works in an attempt to isolate the sun problems. 18 19 Output: 20 @verbatim 21 @endverbatim 22 **/ 23 24 #include <boost/units/reduce_unit.hpp> 25 #include <boost/units/detail/unscale.hpp> 26 #include <boost/units/base_units/temperature/fahrenheit.hpp> 27 28 #include <boost/mpl/assert.hpp> 29 #include <boost/type_traits/is_same.hpp> 30 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>)); 33 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>)); 36 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>)); 39 40 BOOST_MPL_ASSERT((boost::is_same< 41 boost::units::temperature::fahrenheit_base_unit::unit_type, 42 boost::units::unit< 43 boost::units::temperature_dimension, 44 boost::units::heterogeneous_system< 45 boost::units::heterogeneous_system_impl< 46 boost::units::list< 47 boost::units::heterogeneous_system_dim< 48 boost::units::temperature::fahrenheit_base_unit, 49 boost::units::static_rational<1> 50 >, 51 boost::units::dimensionless_type 52 >, 53 boost::units::temperature_dimension, 54 boost::units::dimensionless_type 55 > 56 > 57 > 58 >)); 59