Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:51:35

0001 #ifndef BOOST_NUMERIC_CONCEPT_PROMOTION_POLICY_HPP
0002 #define BOOST_NUMERIC_CONCEPT_PROMOTION_POLICY_HPP
0003 
0004 //  Copyright (c) 2015 Robert Ramey
0005 //
0006 // Distributed under the Boost Software License, Version 1.0. (See
0007 // accompanying file LICENSE_1_0.txt or copy at
0008 // http://www.boost.org/LICENSE_1_0.txt)
0009 
0010 namespace boost {
0011 namespace safe_numerics {
0012 
0013 template<class PP>
0014 struct PromotionPolicy {
0015     using T = int;
0016     using U = int;
0017     using a_type = typename PP::template addition_result<T, U>;
0018     using s_type = typename PP::template subtraction_result<T, U>;
0019     using m_type = typename PP::template multiplication_result<T, U>;
0020     using d_type = typename PP::template division_result<T, U>;
0021     using mod_type = typename PP::template modulus_result<T, U>;
0022     using ls_type = typename PP::template left_shift_result<T, U>;
0023     using rs_type = typename PP::template right_shift_result<T, U>;
0024     using cc_type = typename PP::template comparison_result<T, U>;
0025     using baw_type = typename PP::template bitwise_and_result<T, U>;
0026     using bow_type = typename PP::template bitwise_or_result<T, U>;
0027     using bxw_type = typename PP::template bitwise_xor_result<T, U>;
0028 };
0029 
0030 } // safe_numerics
0031 } // boost
0032 
0033 #endif // BOOST_NUMERIC_CONCEPT_EXCEPTION_POLICY_HPP