]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /////////////////////////////////////////////////////////////// |
2 | // Copyright 2012 John Maddock. Distributed under the Boost | |
3 | // Software License, Version 1.0. (See accompanying file | |
92f5a8d4 | 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt |
7c673cae FG |
5 | |
6 | #ifdef _MSC_VER | |
92f5a8d4 | 7 | #define _SCL_SECURE_NO_WARNINGS |
7c673cae FG |
8 | #endif |
9 | ||
10 | #include <boost/multiprecision/gmp.hpp> | |
11 | ||
12 | #define NO_MIXED_OPS | |
92f5a8d4 | 13 | #define BOOST_MP_NOT_TESTING_NUMBER |
7c673cae FG |
14 | |
15 | #include "test_arithmetic.hpp" | |
16 | #include <boost/rational.hpp> | |
17 | ||
18 | template <class T> | |
92f5a8d4 TL |
19 | struct is_boost_rational<boost::rational<T> > : public boost::mpl::true_ |
20 | {}; | |
7c673cae | 21 | |
92f5a8d4 | 22 | namespace boost { namespace multiprecision { |
7c673cae | 23 | |
92f5a8d4 TL |
24 | template <> |
25 | struct number_category<rational<mpz_int> > : public mpl::int_<number_kind_rational> | |
26 | {}; | |
7c673cae | 27 | |
92f5a8d4 | 28 | }} // namespace boost::multiprecision |
7c673cae FG |
29 | |
30 | int main() | |
31 | { | |
32 | test<boost::rational<boost::multiprecision::mpz_int> >(); | |
33 | return boost::report_errors(); | |
34 | } |