1 // Copyright (c) 2019 Robert Ramey
3 // Distributed under the Boost Software License, Version 1.0. (See
4 // accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
7 #include <boost/safe_numerics/safe_integer.hpp>
8 #include <boost/safe_numerics/native.hpp>
9 #include "test_right_shift_native_results.hpp"
12 using safe_t
= boost::safe_numerics::safe
<
14 boost::safe_numerics::native
17 #include "test_right_shift_constexpr.hpp"
19 using namespace boost::mp11
;
21 template<typename First
, typename Second
>
23 static const std::size_t i
= First();
24 static const std::size_t j
= Second();
25 constexpr static const bool value
= test_right_shift_constexpr(
26 mp_at_c
<test_values
, i
>()(),
27 mp_at_c
<test_values
, j
>()(),
28 test_right_shift_native_result
[i
][j
]
32 #include <boost/mp11/list.hpp>
33 #include <boost/mp11/algorithm.hpp>
36 using namespace boost::mp11
;
38 using value_indices
= mp_iota_c
<mp_size
<test_values
>::value
>;
49 "all values for all integer types correctly right shifted"