summaryrefslogtreecommitdiff
path: root/boost/libs/math/test/std_real_concept_check.cpp
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2020-05-11 22:17:58 +0200
committerChristoph Berg <myon@debian.org>2020-05-11 22:17:58 +0200
commit32a41b1abe1a4aab0892c9c2051be6ba5b379f1e (patch)
treec6e107c1ee4d70610e43a7912e57c720334a08c7 /boost/libs/math/test/std_real_concept_check.cpp
parent08299e8b2bf50ba90daf570f57def529dd29d6e7 (diff)
New upstream version 2.2.0~rc1+repackupstream/2.2.0_rc1+repack
Diffstat (limited to 'boost/libs/math/test/std_real_concept_check.cpp')
-rw-r--r--boost/libs/math/test/std_real_concept_check.cpp199
1 files changed, 0 insertions, 199 deletions
diff --git a/boost/libs/math/test/std_real_concept_check.cpp b/boost/libs/math/test/std_real_concept_check.cpp
deleted file mode 100644
index 1554734e..00000000
--- a/boost/libs/math/test/std_real_concept_check.cpp
+++ /dev/null
@@ -1,199 +0,0 @@
-// Copyright John Maddock 2006.
-// Use, modification and distribution are subject to 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)
-
-#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false
-
-#include <boost/math/concepts/std_real_concept.hpp>
-#include <boost/math/concepts/distributions.hpp>
-
-#include "compile_test/instantiate.hpp"
-
-//
-// The purpose of this test is to verify that our code compiles
-// cleanly with a type whose std lib functions are in namespace
-// std and can *not* be found by ADL. This verifies that we're
-// not finding std lib functions that are in the global namespace
-// for example calling ::pow(double) rather than std::pow(long double).
-// This is a silent error that does the wrong thing at runtime, and
-// of course we can't call std::pow() directly because we want
-// the functions to be found by ADL when that's appropriate.
-//
-// Furthermore our code does different things internally depending
-// on numeric_limits<>::digits, so there are some macros that can
-// be defined that cause our concept-archetype to emulate various
-// floating point types:
-//
-// EMULATE32: 32-bit float
-// EMULATE64: 64-bit double
-// EMULATE80: 80-bit long double
-// EMULATE128: 128-bit long double
-//
-// In order to ensure total code coverage this file must be
-// compiled with each of the above macros in turn, and then
-// without any of the above as well!
-//
-
-#define NULL_MACRO /**/
-#ifdef EMULATE32
-namespace std{
-template<>
-struct numeric_limits<boost::math::concepts::std_real_concept>
-{
- static const bool is_specialized = true;
- static boost::math::concepts::std_real_concept min NULL_MACRO() throw();
- static boost::math::concepts::std_real_concept max NULL_MACRO() throw();
- static const int digits = 24;
- static const int digits10 = 6;
- static const bool is_signed = true;
- static const bool is_integer = false;
- static const bool is_exact = false;
- static const int radix = 2;
- static boost::math::concepts::std_real_concept epsilon() throw();
- static boost::math::concepts::std_real_concept round_error() throw();
- static const int min_exponent = -125;
- static const int min_exponent10 = -37;
- static const int max_exponent = 128;
- static const int max_exponent10 = 38;
- static const bool has_infinity = true;
- static const bool has_quiet_NaN = true;
- static const bool has_signaling_NaN = true;
- static const float_denorm_style has_denorm = denorm_absent;
- static const bool has_denorm_loss = false;
- static boost::math::concepts::std_real_concept infinity() throw();
- static boost::math::concepts::std_real_concept quiet_NaN() throw();
- static boost::math::concepts::std_real_concept signaling_NaN() throw();
- static boost::math::concepts::std_real_concept denorm_min() throw();
- static const bool is_iec559 = true;
- static const bool is_bounded = false;
- static const bool is_modulo = false;
- static const bool traps = false;
- static const bool tinyness_before = false;
- static const float_round_style round_style = round_toward_zero;
-};
-}
-#endif
-#ifdef EMULATE64
-namespace std{
-template<>
-struct numeric_limits<boost::math::concepts::std_real_concept>
-{
- static const bool is_specialized = true;
- static boost::math::concepts::std_real_concept min NULL_MACRO() throw();
- static boost::math::concepts::std_real_concept max NULL_MACRO() throw();
- static const int digits = 53;
- static const int digits10 = 15;
- static const bool is_signed = true;
- static const bool is_integer = false;
- static const bool is_exact = false;
- static const int radix = 2;
- static boost::math::concepts::std_real_concept epsilon() throw();
- static boost::math::concepts::std_real_concept round_error() throw();
- static const int min_exponent = -1021;
- static const int min_exponent10 = -307;
- static const int max_exponent = 1024;
- static const int max_exponent10 = 308;
- static const bool has_infinity = true;
- static const bool has_quiet_NaN = true;
- static const bool has_signaling_NaN = true;
- static const float_denorm_style has_denorm = denorm_absent;
- static const bool has_denorm_loss = false;
- static boost::math::concepts::std_real_concept infinity() throw();
- static boost::math::concepts::std_real_concept quiet_NaN() throw();
- static boost::math::concepts::std_real_concept signaling_NaN() throw();
- static boost::math::concepts::std_real_concept denorm_min() throw();
- static const bool is_iec559 = true;
- static const bool is_bounded = false;
- static const bool is_modulo = false;
- static const bool traps = false;
- static const bool tinyness_before = false;
- static const float_round_style round_style = round_toward_zero;
-};
-}
-#endif
-#ifdef EMULATE80
-namespace std{
-template<>
-struct numeric_limits<boost::math::concepts::std_real_concept>
-{
- static const bool is_specialized = true;
- static boost::math::concepts::std_real_concept min NULL_MACRO() throw();
- static boost::math::concepts::std_real_concept max NULL_MACRO() throw();
- static const int digits = 64;
- static const int digits10 = 18;
- static const bool is_signed = true;
- static const bool is_integer = false;
- static const bool is_exact = false;
- static const int radix = 2;
- static boost::math::concepts::std_real_concept epsilon() throw();
- static boost::math::concepts::std_real_concept round_error() throw();
- static const int min_exponent = -16381;
- static const int min_exponent10 = -4931;
- static const int max_exponent = 16384;
- static const int max_exponent10 = 4932;
- static const bool has_infinity = true;
- static const bool has_quiet_NaN = true;
- static const bool has_signaling_NaN = true;
- static const float_denorm_style has_denorm = denorm_absent;
- static const bool has_denorm_loss = false;
- static boost::math::concepts::std_real_concept infinity() throw();
- static boost::math::concepts::std_real_concept quiet_NaN() throw();
- static boost::math::concepts::std_real_concept signaling_NaN() throw();
- static boost::math::concepts::std_real_concept denorm_min() throw();
- static const bool is_iec559 = true;
- static const bool is_bounded = false;
- static const bool is_modulo = false;
- static const bool traps = false;
- static const bool tinyness_before = false;
- static const float_round_style round_style = round_toward_zero;
-};
-}
-#endif
-#ifdef EMULATE128
-namespace std{
-template<>
-struct numeric_limits<boost::math::concepts::std_real_concept>
-{
- static const bool is_specialized = true;
- static boost::math::concepts::std_real_concept min NULL_MACRO() throw();
- static boost::math::concepts::std_real_concept max NULL_MACRO() throw();
- static const int digits = 113;
- static const int digits10 = 33;
- static const bool is_signed = true;
- static const bool is_integer = false;
- static const bool is_exact = false;
- static const int radix = 2;
- static boost::math::concepts::std_real_concept epsilon() throw();
- static boost::math::concepts::std_real_concept round_error() throw();
- static const int min_exponent = -16381;
- static const int min_exponent10 = -4931;
- static const int max_exponent = 16384;
- static const int max_exponent10 = 4932;
- static const bool has_infinity = true;
- static const bool has_quiet_NaN = true;
- static const bool has_signaling_NaN = true;
- static const float_denorm_style has_denorm = denorm_absent;
- static const bool has_denorm_loss = false;
- static boost::math::concepts::std_real_concept infinity() throw();
- static boost::math::concepts::std_real_concept quiet_NaN() throw();
- static boost::math::concepts::std_real_concept signaling_NaN() throw();
- static boost::math::concepts::std_real_concept denorm_min() throw();
- static const bool is_iec559 = true;
- static const bool is_bounded = false;
- static const bool is_modulo = false;
- static const bool traps = false;
- static const bool tinyness_before = false;
- static const float_round_style round_style = round_toward_zero;
-};
-}
-#endif
-
-
-
-int main()
-{
- instantiate(boost::math::concepts::std_real_concept(0));
-}
-
-