| 1 | #ifndef BOOST_SAFE_NUMERICS_TEST_CHECKED_CAST_HPP |
| 2 | #define BOOST_SAFE_NUMERICS_TEST_CHECKED_CAST_HPP |
| 3 | |
| 4 | // Copyright (c) 2018 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 | |
| 10 | #include <boost/mp11/integral.hpp> |
| 11 | #include "test_values.hpp" |
| 12 | |
| 13 | // note: the types indexed on the left side of the table are gathered |
| 14 | // by filtering the test_values list. So the types are in the same |
| 15 | // sequence |
| 16 | |
| 17 | constexpr const char *test_result_cast[boost::mp11::mp_size<test_values>::value] = { |
| 18 | // 0 0 0 0 |
| 19 | // 01234567012345670123456701234567 |
| 20 | // 01234567890123456789012345678901 |
| 21 | /* 0*/ ".....xx..xx..xx...xx.xxx.xxx.xxx" , |
| 22 | /* 1*/ ".........xx..xx.......xx.xxx.xxx" , |
| 23 | /* 2*/ ".............xx...........xx.xxx" , |
| 24 | /* 3*/ "..............................xx" , |
| 25 | /* 4*/ "..xx.xxx.xxx.xxx.....xxx.xxx.xxx" , |
| 26 | /* 5*/ "..xx..xx.xxx.xxx.........xxx.xxx" , |
| 27 | /* 6*/ "..xx..xx..xx.xxx.............xxx" , |
| 28 | /* 7*/ "..xx..xx..xx..xx................" |
| 29 | }; |
| 30 | |
| 31 | #endif // BOOST_SAFE_NUMERICS_TEST_CHECKED_CAST_HPP |
| 32 | |