/////////////////////////////////////////////////////////////////////////////// // Copyright 2013 John Maddock. 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_MP_UBLAS_HPP #define BOOST_MP_UBLAS_HPP namespace boost { namespace numeric { namespace ublas { template class sparse_vector_element; template inline bool operator == (const sparse_vector_element& a, const ::boost::multiprecision::number& b) { typedef typename sparse_vector_element::const_reference ref_type; return static_cast(a) == b; } template struct promote_traits; template struct promote_traits, boost::multiprecision::number > { typedef boost::multiprecision::number number1_t; typedef boost::multiprecision::number number2_t; typedef typename mpl::if_c< is_convertible::value && !is_convertible::value, number2_t, number1_t >::type promote_type; }; template struct promote_traits, boost::multiprecision::detail::expression > { typedef boost::multiprecision::number number1_t; typedef boost::multiprecision::detail::expression expression_type; typedef typename expression_type::result_type number2_t; typedef typename promote_traits::promote_type promote_type; }; template struct promote_traits, boost::multiprecision::number > { typedef boost::multiprecision::number number1_t; typedef boost::multiprecision::detail::expression expression_type; typedef typename expression_type::result_type number2_t; typedef typename promote_traits::promote_type promote_type; }; template struct promote_traits, boost::multiprecision::detail::expression > { typedef boost::multiprecision::detail::expression expression1_t; typedef typename expression1_t::result_type number1_t; typedef boost::multiprecision::detail::expression expression2_t; typedef typename expression2_t::result_type number2_t; }; }}} // namespace #endif