multiprc_concept_check_4.cpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // Copyright John Maddock 2013.
  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 multiprecision::number 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_GROUP_9
  12. #ifdef _MSC_VER
  13. # pragma warning(disable:4800)
  14. # pragma warning(disable:4512)
  15. # pragma warning(disable:4127)
  16. # pragma warning(disable:4512)
  17. # pragma warning(disable:4503) // decorated name length exceeded, name was truncated
  18. #endif
  19. #include <boost/multiprecision/cpp_dec_float.hpp>
  20. #include <boost/math/concepts/real_type_concept.hpp>
  21. #include "compile_test/instantiate.hpp"
  22. using namespace boost::multiprecision;
  23. typedef number<cpp_dec_float<50>, et_on> test_type;
  24. // We get sporadic internal compiler errors from gcc-7.x when CI testing
  25. // that don't appear to be reproducable locally. gcc-6.x and gcc-8.x are fine
  26. // so for now it's a <shrug> and move on...
  27. #if ! (defined(BOOST_GCC) && (__GNUC__ == 7))
  28. void foo()
  29. {
  30. instantiate(test_type());
  31. }
  32. #endif
  33. int main()
  34. {
  35. //BOOST_CONCEPT_ASSERT((boost::math::concepts::RealTypeConcept<test_type>));
  36. }