boost/libs/multiprecision/test/test_arithmetic_tommath_br.cpp

36 lines
903 B
C++
Raw Permalink Normal View History

2018-01-12 21:47:58 +01:00
///////////////////////////////////////////////////////////////
// Copyright 2012 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
2021-10-05 21:37:46 +02:00
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
2018-01-12 21:47:58 +01:00
#ifdef _MSC_VER
2021-10-05 21:37:46 +02:00
#define _SCL_SECURE_NO_WARNINGS
2018-01-12 21:47:58 +01:00
#endif
#include <boost/multiprecision/tommath.hpp>
#define NO_MIXED_OPS
2021-10-05 21:37:46 +02:00
#define BOOST_MP_NOT_TESTING_NUMBER
2018-01-12 21:47:58 +01:00
#include "test_arithmetic.hpp"
#include <boost/rational.hpp>
template <class T>
2021-10-05 21:37:46 +02:00
struct is_boost_rational<boost::rational<T> > : public std::integral_constant<bool, true>
{};
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
namespace boost { namespace multiprecision {
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
template <>
struct number_category<rational<tom_int> > : public std::integral_constant<int, number_kind_rational>
{};
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
}} // namespace boost::multiprecision
2018-01-12 21:47:58 +01:00
int main()
{
test<boost::rational<boost::multiprecision::tom_int> >();
return boost::report_errors();
}