test_arithmetic_mpq.cpp 602 B

123456789101112131415161718192021222324
  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/gmp.hpp>
  9. #include "test_arithmetic.hpp"
  10. template <>
  11. struct related_type<boost::multiprecision::mpq_rational>
  12. {
  13. typedef boost::multiprecision::mpz_int type;
  14. };
  15. int main()
  16. {
  17. test<boost::multiprecision::mpq_rational>();
  18. return boost::report_errors();
  19. }