summaryrefslogtreecommitdiff
path: root/libs/multiprecision/test/test_nothrow_float128.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2015-04-08 03:09:47 +0000
committer <>2015-05-05 14:37:32 +0000
commitf2541bb90af059680aa7036f315f052175999355 (patch)
treea5b214744b256f07e1dc2bd7273035a7808c659f /libs/multiprecision/test/test_nothrow_float128.cpp
parented232fdd34968697a68783b3195b1da4226915b5 (diff)
downloadboost-tarball-master.tar.gz
Imported from /home/lorry/working-area/delta_boost-tarball/boost_1_58_0.tar.bz2.HEADboost_1_58_0master
Diffstat (limited to 'libs/multiprecision/test/test_nothrow_float128.cpp')
-rw-r--r--libs/multiprecision/test/test_nothrow_float128.cpp53
1 files changed, 53 insertions, 0 deletions
diff --git a/libs/multiprecision/test/test_nothrow_float128.cpp b/libs/multiprecision/test/test_nothrow_float128.cpp
new file mode 100644
index 000000000..921880e5e
--- /dev/null
+++ b/libs/multiprecision/test/test_nothrow_float128.cpp
@@ -0,0 +1,53 @@
+///////////////////////////////////////////////////////////////////////////////
+// Copyright 2015 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/multiprecision/float128.hpp>
+#include <boost/type_traits/is_nothrow_move_constructible.hpp>
+#include <boost/type_traits/is_nothrow_move_assignable.hpp>
+#include <boost/type_traits/has_nothrow_constructor.hpp>
+#include <boost/type_traits/has_nothrow_assign.hpp>
+#include <boost/type_traits/has_nothrow_copy.hpp>
+#include <boost/static_assert.hpp>
+
+#ifndef BOOST_NO_NOEXCEPT
+
+#if !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) || defined(BOOST_IS_NOTHROW_MOVE_CONSTRUCT)
+//
+// Move construct:
+//
+BOOST_STATIC_ASSERT(boost::is_nothrow_move_constructible<boost::multiprecision::float128>::value);
+
+#endif
+
+#if !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) || defined(BOOST_IS_NOTHROW_MOVE_ASSIGN)
+//
+// Move assign:
+//
+BOOST_STATIC_ASSERT(boost::is_nothrow_move_assignable<boost::multiprecision::float128>::value);
+
+#endif
+
+//
+// Construct:
+//
+#ifdef BOOST_HAS_NOTHROW_CONSTRUCTOR
+BOOST_STATIC_ASSERT(boost::has_nothrow_constructor<boost::multiprecision::float128>::value);
+#endif
+//
+// Copy construct:
+//
+#ifdef BOOST_HAS_NOTHROW_COPY
+BOOST_STATIC_ASSERT(boost::has_nothrow_copy<boost::multiprecision::float128>::value);
+#endif
+//
+// Assign:
+//
+#ifdef BOOST_HAS_NOTHROW_ASSIGN
+BOOST_STATIC_ASSERT(boost::has_nothrow_assign<boost::multiprecision::float128>::value);
+#endif
+
+#endif // noexcept
+
+