X-Git-Url: https://git.donarmstrong.com/?p=rsem.git;a=blobdiff_plain;f=boost%2Fnumeric%2Fconversion%2Fdetail%2Fsign_mixture.hpp;fp=boost%2Fnumeric%2Fconversion%2Fdetail%2Fsign_mixture.hpp;h=c7f9e42afe8b998d3bdeb85e301f13fa4f18d6f1;hp=0000000000000000000000000000000000000000;hb=2d71eb92104693ca9baa5a2e1c23eeca776d8fd3;hpb=da57529b92adbb7ae74a89861cb39fb35ac7c62d diff --git a/boost/numeric/conversion/detail/sign_mixture.hpp b/boost/numeric/conversion/detail/sign_mixture.hpp new file mode 100644 index 0000000..c7f9e42 --- /dev/null +++ b/boost/numeric/conversion/detail/sign_mixture.hpp @@ -0,0 +1,72 @@ +// (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 +// Use, modification, and distribution is subject to 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) + +// See library home page at http://www.boost.org/libs/numeric/conversion +// +// Contact the author at: fernando_cacciola@hotmail.com +// +#ifndef BOOST_NUMERIC_CONVERSION_DETAIL_SIGN_MIXTURE_FLC_12NOV2002_HPP +#define BOOST_NUMERIC_CONVERSION_DETAIL_SIGN_MIXTURE_FLC_12NOV2002_HPP + +#include "boost/config.hpp" +#include "boost/limits.hpp" + +#include "boost/numeric/conversion/sign_mixture_enum.hpp" +#include "boost/numeric/conversion/detail/meta.hpp" + +#include "boost/mpl/integral_c.hpp" + +namespace boost { namespace numeric { namespace convdetail +{ + // Integral Constants for 'SignMixture' + typedef mpl::integral_c unsig2unsig_c ; + typedef mpl::integral_c sig2sig_c ; + typedef mpl::integral_c sig2unsig_c ; + typedef mpl::integral_c unsig2sig_c ; + + // Metafunction: + // + // get_sign_mixture::type + // + // Selects the appropriate SignMixture Integral Constant for the combination T,S. + // + template + struct get_sign_mixture + { + typedef mpl::bool_< ::std::numeric_limits::is_signed > S_signed ; + typedef mpl::bool_< ::std::numeric_limits::is_signed > T_signed ; + + typedef typename + for_both::type + type ; + } ; + + // Metafunction: + // + // for_sign_mixture::type + // + // {SignMixture} is one of the Integral Constants for SignMixture, declared above. + // {Sig2Sig,Sig2Unsig,Unsig2Sig,Unsig2Unsig} are aribtrary types. (not metafunctions) + // + // According to the value of 'SignMixture', selects the corresponding type. + // + template + struct for_sign_mixture + { + typedef typename + ct_switch4::type + type ; + } ; + +} } } // namespace boost::numeric::convdetail + +#endif +// +/////////////////////////////////////////////////////////////////////////////////////////////// + +