1#ifndef BOOST_NUMERIC_CONCEPT_PROMOTION_POLICY_HPP
2#define BOOST_NUMERIC_CONCEPT_PROMOTION_POLICY_HPP
3
4// Copyright (c) 2015 Robert Ramey
5//
6// Distributed under the Boost Software License, Version 1.0. (See
7// accompanying file LICENSE_1_0.txt or copy at
8// http://www.boost.org/LICENSE_1_0.txt)
9
10namespace boost {
11namespace safe_numerics {
12
13template<class PP>
14struct PromotionPolicy {
15 using T = int;
16 using U = int;
17 using a_type = typename PP::template addition_result<T, U>;
18 using s_type = typename PP::template subtraction_result<T, U>;
19 using m_type = typename PP::template multiplication_result<T, U>;
20 using d_type = typename PP::template division_result<T, U>;
21 using mod_type = typename PP::template modulus_result<T, U>;
22 using ls_type = typename PP::template left_shift_result<T, U>;
23 using rs_type = typename PP::template right_shift_result<T, U>;
24 using cc_type = typename PP::template comparison_result<T, U>;
25 using baw_type = typename PP::template bitwise_and_result<T, U>;
26 using bow_type = typename PP::template bitwise_or_result<T, U>;
27 using bxw_type = typename PP::template bitwise_xor_result<T, U>;
28};
29
30} // safe_numerics
31} // boost
32
33#endif // BOOST_NUMERIC_CONCEPT_EXCEPTION_POLICY_HPP
34

source code of boost/libs/safe_numerics/include/boost/safe_numerics/concept/promotion_policy.hpp