test_nothrow_mpfr.cpp 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Copyright 2015 John Maddock. Distributed under the Boost
  3. // 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. #include <boost/multiprecision/mpfr.hpp>
  6. #include <boost/type_traits/is_nothrow_move_constructible.hpp>
  7. #include <boost/type_traits/is_nothrow_move_assignable.hpp>
  8. #include <boost/type_traits/has_nothrow_constructor.hpp>
  9. #include <boost/type_traits/has_nothrow_assign.hpp>
  10. #include <boost/type_traits/has_nothrow_copy.hpp>
  11. #include <boost/static_assert.hpp>
  12. #ifndef BOOST_NO_CXX11_NOEXCEPT
  13. #if !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) || defined(BOOST_IS_NOTHROW_MOVE_CONSTRUCT)
  14. //
  15. // Move construct:
  16. //
  17. BOOST_STATIC_ASSERT(boost::is_nothrow_move_constructible<boost::multiprecision::mpfr_float>::value);
  18. BOOST_STATIC_ASSERT(boost::is_nothrow_move_constructible<boost::multiprecision::mpfr_float_100>::value);
  19. #endif
  20. #if !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) || defined(BOOST_IS_NOTHROW_MOVE_ASSIGN)
  21. //
  22. // Move assign:
  23. //
  24. BOOST_STATIC_ASSERT(boost::is_nothrow_move_assignable<boost::multiprecision::mpfr_float>::value);
  25. BOOST_STATIC_ASSERT(boost::is_nothrow_move_assignable<boost::multiprecision::mpfr_float_100>::value);
  26. #endif
  27. #endif // noexcept