test_arithmetic_tommath_br.cpp 868 B

1234567891011121314151617181920212223242526272829303132333435
  1. ///////////////////////////////////////////////////////////////
  2. // Copyright 2012 John Maddock. Distributed under the Boost
  3. // Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
  5. #ifdef _MSC_VER
  6. #define _SCL_SECURE_NO_WARNINGS
  7. #endif
  8. #include <boost/multiprecision/tommath.hpp>
  9. #define NO_MIXED_OPS
  10. #define BOOST_MP_NOT_TESTING_NUMBER
  11. #include "test_arithmetic.hpp"
  12. #include <boost/rational.hpp>
  13. template <class T>
  14. struct is_boost_rational<boost::rational<T> > : public boost::mpl::true_
  15. {};
  16. namespace boost { namespace multiprecision {
  17. template <>
  18. struct number_category<rational<tom_int> > : public mpl::int_<number_kind_rational>
  19. {};
  20. }} // namespace boost::multiprecision
  21. int main()
  22. {
  23. test<boost::rational<boost::multiprecision::tom_int> >();
  24. return boost::report_errors();
  25. }