mpreal_concept_check.cpp 921 B

123456789101112131415161718192021222324252627282930313233
  1. // Copyright John Maddock 2007-8.
  2. // Use, modification and distribution are subject to the
  3. // Boost Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. //
  6. // This tests two things: that mpfr::mpreal meets our
  7. // conceptual requirements, and that we can instantiate
  8. // all our distributions and special functions on this type.
  9. //
  10. #define BOOST_MATH_ASSERT_UNDEFINED_POLICY false
  11. #define TEST_MPFR
  12. #include <boost/math/bindings/mpreal.hpp>
  13. #include <boost/math/concepts/real_type_concept.hpp>
  14. #include "compile_test/instantiate.hpp"
  15. #include <boost/static_assert.hpp>
  16. //BOOST_STATIC_ASSERT((boost::is_same<mpfr::mpreal, boost::math::tools::promote_args<mpfr::mpreal>::type >::value));
  17. void foo()
  18. {
  19. instantiate(mpfr::mpreal());
  20. }
  21. int main()
  22. {
  23. BOOST_CONCEPT_ASSERT((boost::math::concepts::RealTypeConcept<mpfr::mpreal>));
  24. return 0;
  25. }