From fbadd8d653934a74eff0ee7298151edf9e7e02af Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Sun, 14 Mar 2021 12:49:38 +0300 Subject: [PATCH] remove boost.static_assert --- config/has_128bit_floatmax_t.cpp | 4 +- doc/cstdfloat/cstdfloat.qbk | 2 +- .../factorials/sf_double_factorial.html | 2 +- .../math_toolkit/factorials/sf_factorial.html | 2 +- doc/html/math_toolkit/rationale.html | 2 +- .../root_finding_examples/elliptic_eg.html | 8 +- .../root_finding_examples/nth_root.html | 10 +-- doc/sf/factorials.qbk | 4 +- example/numerical_derivative_example.cpp | 4 +- example/root_elliptic_finding.cpp | 10 +-- example/root_finding_n_example.cpp | 10 +-- example/root_finding_start_locations.cpp | 10 +-- example/root_n_finding_algorithms.cpp | 26 +++--- .../math/constants/calculate_constants.hpp | 4 +- .../boost/math/cstdfloat/cstdfloat_cmath.hpp | 2 +- .../math/cstdfloat/cstdfloat_iostream.hpp | 2 +- .../boost/math/cstdfloat/cstdfloat_types.hpp | 42 ++++----- .../differentiation/finite_difference.hpp | 2 +- include/boost/math/distributions/cauchy.hpp | 10 +-- .../detail/derived_accessors.hpp | 2 +- .../math/distributions/find_location.hpp | 8 +- .../boost/math/distributions/find_scale.hpp | 14 +-- .../math/distributions/non_central_beta.hpp | 4 +- .../boost/math/policies/error_handling.hpp | 4 +- include/boost/math/special_functions/airy.hpp | 8 +- .../boost/math/special_functions/bessel.hpp | 12 +-- include/boost/math/special_functions/beta.hpp | 10 +-- .../boost/math/special_functions/binomial.hpp | 2 +- include/boost/math/special_functions/cbrt.hpp | 2 +- .../special_functions/detail/fp_traits.hpp | 10 +-- .../special_functions/detail/lanczos_sse2.hpp | 2 +- .../special_functions/detail/polygamma.hpp | 2 +- .../detail/unchecked_factorial.hpp | 4 +- .../boost/math/special_functions/expm1.hpp | 7 +- .../math/special_functions/factorials.hpp | 8 +- .../math/special_functions/lambert_w.hpp | 4 +- .../boost/math/special_functions/log1p.hpp | 10 +-- include/boost/math/special_functions/next.hpp | 26 +++--- include/boost/math/special_functions/ulp.hpp | 4 +- include/boost/math/tools/assert.hpp | 5 ++ .../boost/math/tools/convert_from_string.hpp | 2 +- include/boost/math/tools/polynomial_gcd.hpp | 2 +- include/boost/math/tools/precision.hpp | 14 +-- include/boost/math/tools/promotion.hpp | 4 +- include/boost/math/tr1.hpp | 14 +-- test/Jamfile.v2 | 2 +- test/compile_test/test_traits.cpp | 86 +++++++++---------- test/complex_test.cpp | 2 +- test/float128/setup.hpp | 4 +- test/mpreal_concept_check.cpp | 4 +- test/pow_test.cpp | 18 ++-- test/test_find_scale.cpp | 2 +- test/test_standalone_asserts.cpp | 19 ++++ tools/doc/cstdfloat.qbk | 2 +- 54 files changed, 246 insertions(+), 233 deletions(-) create mode 100644 test/test_standalone_asserts.cpp diff --git a/config/has_128bit_floatmax_t.cpp b/config/has_128bit_floatmax_t.cpp index aee4837ce..17205c450 100644 --- a/config/has_128bit_floatmax_t.cpp +++ b/config/has_128bit_floatmax_t.cpp @@ -4,13 +4,13 @@ // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include -#include +#include #ifndef BOOST_FLOAT128_C #error "There is no 128 bit floating point type" #endif -BOOST_STATIC_ASSERT(sizeof(boost::floatmax_t) * CHAR_BIT == 128); +BOOST_MATH_STATIC_ASSERT(sizeof(boost::floatmax_t) * CHAR_BIT == 128); int main() { diff --git a/doc/cstdfloat/cstdfloat.qbk b/doc/cstdfloat/cstdfloat.qbk index 3560c1490..1e09a2ad8 100644 --- a/doc/cstdfloat/cstdfloat.qbk +++ b/doc/cstdfloat/cstdfloat.qbk @@ -68,7 +68,7 @@ Based on the results of these queries, an attempt is made to automatically detect the presence of built-in floating-point types having specified widths. An unequivocal test requiring conformance with __IEEE754 (IEC599) based on [@ http://en.cppreference.com/w/cpp/types/numeric_limits/is_iec559 `std::numeric_limits<>::is_iec559`] -is performed with `BOOST_STATIC_ASSERT`. +is performed with `BOOST_MATH_STATIC_ASSERT`. In addition, this Boost implementation `` supports an 80-bit floating-point `typedef` if it can be detected, diff --git a/doc/html/math_toolkit/factorials/sf_double_factorial.html b/doc/html/math_toolkit/factorials/sf_double_factorial.html index 8b2a73a51..7aff8b680 100644 --- a/doc/html/math_toolkit/factorials/sf_double_factorial.html +++ b/doc/html/math_toolkit/factorials/sf_double_factorial.html @@ -85,7 +85,7 @@ The source code static_assert and comment just after the will be:

-
BOOST_STATIC_ASSERT(!boost::is_integral<T>::value);
+
BOOST_MATH_STATIC_ASSERT(!boost::is_integral<T>::value);
 // factorial<unsigned int>(n) is not implemented
 // because it would overflow integral type T for too small n
 // to be useful. Use instead a floating-point type,
diff --git a/doc/html/math_toolkit/factorials/sf_factorial.html b/doc/html/math_toolkit/factorials/sf_factorial.html
index 9b8541661..0ce21c96c 100644
--- a/doc/html/math_toolkit/factorials/sf_factorial.html
+++ b/doc/html/math_toolkit/factorials/sf_factorial.html
@@ -87,7 +87,7 @@
           The source code static_assert
           and comment just after the will be:
         

-
BOOST_STATIC_ASSERT(!boost::is_integral<T>::value);
+
BOOST_MATH_STATIC_ASSERT(!boost::is_integral<T>::value);
 // factorial<unsigned int>(n) is not implemented
 // because it would overflow integral type T for too small n
 // to be useful. Use instead a floating-point type,
diff --git a/doc/html/math_toolkit/rationale.html b/doc/html/math_toolkit/rationale.html
index 089877ab8..55f350730 100644
--- a/doc/html/math_toolkit/rationale.html
+++ b/doc/html/math_toolkit/rationale.html
@@ -35,7 +35,7 @@
       is made to automatically detect the presence of built-in floating-point types
       having specified widths. An unequivocal test requiring conformance with IEEE_floating_point
       (IEC599) based on std::numeric_limits<>::is_iec559
-      is performed with BOOST_STATIC_ASSERT.
+      is performed with BOOST_MATH_STATIC_ASSERT.
     

In addition, this Boost implementation <boost/cstdfloat.hpp> diff --git a/doc/html/math_toolkit/root_finding_examples/elliptic_eg.html b/doc/html/math_toolkit/root_finding_examples/elliptic_eg.html index 8edac458f..3a557f403 100644 --- a/doc/html/math_toolkit/root_finding_examples/elliptic_eg.html +++ b/doc/html/math_toolkit/root_finding_examples/elliptic_eg.html @@ -123,7 +123,7 @@

template <class T = double>
 struct elliptic_root_functor_1deriv
 { // Functor also returning 1st derivative.
-   BOOST_STATIC_ASSERT_MSG(boost::is_integral<T>::value == false, "Only floating-point type types can be used!");
+   BOOST_MATH_STATIC_ASSERT_MSG(boost::is_integral<T>::value == false, "Only floating-point type types can be used!");
 
    elliptic_root_functor_1deriv(T const& arc, T const& radius) : m_arc(arc), m_radius(radius)
    { // Constructor just stores value a to find root of.
@@ -162,7 +162,7 @@
    using namespace std;  // Help ADL of std functions.
    using namespace boost::math::tools; // For newton_raphson_iterate.
 
-   BOOST_STATIC_ASSERT_MSG(boost::is_integral<T>::value == false, "Only floating-point type types can be used!");
+   BOOST_MATH_STATIC_ASSERT_MSG(boost::is_integral<T>::value == false, "Only floating-point type types can be used!");
 
    T guess = sqrt(arc * arc / 16 - radius * radius);
    T min = 0;   // Minimum possible value is zero.
@@ -192,7 +192,7 @@
 
template <class T = double>
 struct elliptic_root_functor_2deriv
 { // Functor returning both 1st and 2nd derivatives.
-   BOOST_STATIC_ASSERT_MSG(boost::is_integral<T>::value == false, "Only floating-point type types can be used!");
+   BOOST_MATH_STATIC_ASSERT_MSG(boost::is_integral<T>::value == false, "Only floating-point type types can be used!");
 
    elliptic_root_functor_2deriv(T const& arc, T const& radius) : m_arc(arc), m_radius(radius) {}
    std::tuple<T, T, T> operator()(T const& x)
@@ -229,7 +229,7 @@
    using namespace std;                // Help ADL of std functions.
    using namespace boost::math::tools; // For halley_iterate.
 
-   BOOST_STATIC_ASSERT_MSG(boost::is_integral<T>::value == false, "Only floating-point type types can be used!");
+   BOOST_MATH_STATIC_ASSERT_MSG(boost::is_integral<T>::value == false, "Only floating-point type types can be used!");
 
    T guess = sqrt(arc * arc / 16 - radius * radius);
    T min = 0;                                   // Minimum possible value is zero.
diff --git a/doc/html/math_toolkit/root_finding_examples/nth_root.html b/doc/html/math_toolkit/root_finding_examples/nth_root.html
index f5af60119..8aee8cce7 100644
--- a/doc/html/math_toolkit/root_finding_examples/nth_root.html
+++ b/doc/html/math_toolkit/root_finding_examples/nth_root.html
@@ -53,8 +53,8 @@
 
template <int N, class T = double>
 struct nth_functor_2deriv
 { // Functor returning both 1st and 2nd derivatives.
-  BOOST_STATIC_ASSERT_MSG(boost::is_integral<T>::value == false, "Only floating-point type types can be used!");
-  BOOST_STATIC_ASSERT_MSG((N > 0) == true, "root N must be > 0!");
+  BOOST_MATH_STATIC_ASSERT_MSG(boost::is_integral<T>::value == false, "Only floating-point type types can be used!");
+  BOOST_MATH_STATIC_ASSERT_MSG((N > 0) == true, "root N must be > 0!");
 
   nth_functor_2deriv(T const& to_find_root_of) : a(to_find_root_of)
   { /* Constructor stores value a to find root of, for example: */ }
@@ -84,9 +84,9 @@
   using namespace std;  // Help ADL of std functions.
   using namespace boost::math::tools; // For halley_iterate.
 
-  BOOST_STATIC_ASSERT_MSG(boost::is_integral<T>::value == false, "Only floating-point type types can be used!");
-  BOOST_STATIC_ASSERT_MSG((N > 0) == true, "root N must be > 0!");
-  BOOST_STATIC_ASSERT_MSG((N > 1000) == false, "root N is too big!");
+  BOOST_MATH_STATIC_ASSERT_MSG(boost::is_integral<T>::value == false, "Only floating-point type types can be used!");
+  BOOST_MATH_STATIC_ASSERT_MSG((N > 0) == true, "root N must be > 0!");
+  BOOST_MATH_STATIC_ASSERT_MSG((N > 1000) == false, "root N is too big!");
 
   typedef double guess_type; // double may restrict (exponent) range for a multiprecision T?
 
diff --git a/doc/sf/factorials.qbk b/doc/sf/factorials.qbk
index 8c2e37755..285c65730 100644
--- a/doc/sf/factorials.qbk
+++ b/doc/sf/factorials.qbk
@@ -45,7 +45,7 @@ and not an integer type - that would overflow far too easily for quite small val
 The source code `static_assert` and comment just after the  will be:
 
 ``
-   BOOST_STATIC_ASSERT(!boost::is_integral::value);
+   BOOST_MATH_STATIC_ASSERT(!boost::is_integral::value);
    // factorial(n) is not implemented
    // because it would overflow integral type T for too small n
    // to be useful. Use instead a floating-point type,
@@ -155,7 +155,7 @@ and not an integer type - that would overflow far too easily!
 The source code `static_assert` and comment just after the  will be:
 
 ``
-   BOOST_STATIC_ASSERT(!boost::is_integral::value);
+   BOOST_MATH_STATIC_ASSERT(!boost::is_integral::value);
    // factorial(n) is not implemented
    // because it would overflow integral type T for too small n
    // to be useful. Use instead a floating-point type,
diff --git a/example/numerical_derivative_example.cpp b/example/numerical_derivative_example.cpp
index 214ed498e..f3d6ddc91 100644
--- a/example/numerical_derivative_example.cpp
+++ b/example/numerical_derivative_example.cpp
@@ -12,7 +12,7 @@
 # include 
 # include 
 
-#include 
+#include 
 #include  
 #include  // for float_distance
 
@@ -74,7 +74,7 @@ value_type derivative (const value_type x, const value_type dx, function_type fu
     \return derivative at x.
   */
 
-  BOOST_STATIC_ASSERT_MSG(false == std::numeric_limits::is_integer, "value_type must be a floating-point type!");
+  BOOST_MATH_STATIC_ASSERT_MSG(false == std::numeric_limits::is_integer, "value_type must be a floating-point type!");
 
   const value_type dx2(dx * 2U);
   const value_type dx3(dx * 3U);
diff --git a/example/root_elliptic_finding.cpp b/example/root_elliptic_finding.cpp
index 9a7e0c345..ff8f5c605 100644
--- a/example/root_elliptic_finding.cpp
+++ b/example/root_elliptic_finding.cpp
@@ -224,7 +224,7 @@ T elliptic_root_noderiv(T radius, T arc)
 template 
 struct elliptic_root_functor_1deriv
 { // Functor also returning 1st derivative.
-   BOOST_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
+   BOOST_MATH_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
 
    elliptic_root_functor_1deriv(T const& arc, T const& radius) : m_arc(arc), m_radius(radius)
    { // Constructor just stores value a to find root of.
@@ -260,7 +260,7 @@ T elliptic_root_1deriv(T radius, T arc)
    using namespace std;  // Help ADL of std functions.
    using namespace boost::math::tools; // For newton_raphson_iterate.
 
-   BOOST_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
+   BOOST_MATH_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
 
    T guess = sqrt(arc * arc / 16 - radius * radius);
    T min = 0;   // Minimum possible value is zero.
@@ -284,7 +284,7 @@ T elliptic_root_1deriv(T radius, T arc)
 template 
 struct elliptic_root_functor_2deriv
 { // Functor returning both 1st and 2nd derivatives.
-   BOOST_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
+   BOOST_MATH_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
 
    elliptic_root_functor_2deriv(T const& arc, T const& radius) : m_arc(arc), m_radius(radius) {}
    std::tuple operator()(T const& x)
@@ -318,7 +318,7 @@ T elliptic_root_2deriv(T radius, T arc)
    using namespace std;                // Help ADL of std functions.
    using namespace boost::math::tools; // For halley_iterate.
 
-   BOOST_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
+   BOOST_MATH_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
 
    T guess = sqrt(arc * arc / 16 - radius * radius);
    T min = 0;                                   // Minimum possible value is zero.
@@ -345,7 +345,7 @@ T elliptic_root_2deriv_s(T arc, T radius)
   using namespace std;  // Help ADL of std functions.
   using namespace boost::math::tools; // For schroder_iterate.
 
-  BOOST_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
+  BOOST_MATH_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
 
   T guess = sqrt(arc * arc / 16 - radius * radius);
   T min = 0; // Minimum possible value is zero.
diff --git a/example/root_finding_n_example.cpp b/example/root_finding_n_example.cpp
index 096ed9545..9406334fd 100644
--- a/example/root_finding_n_example.cpp
+++ b/example/root_finding_n_example.cpp
@@ -43,8 +43,8 @@ using std::numeric_limits;
 template 
 struct nth_functor_2deriv
 { // Functor returning both 1st and 2nd derivatives.
-  BOOST_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
-  BOOST_STATIC_ASSERT_MSG((N > 0) == true, "root N must be > 0!");
+  BOOST_MATH_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
+  BOOST_MATH_STATIC_ASSERT_MSG((N > 0) == true, "root N must be > 0!");
 
   nth_functor_2deriv(T const& to_find_root_of) : a(to_find_root_of)
   { /* Constructor stores value a to find root of, for example: */ }
@@ -91,9 +91,9 @@ T nth_2deriv(T x)
   using namespace std;  // Help ADL of std functions.
   using namespace boost::math::tools; // For halley_iterate.
 
-  BOOST_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
-  BOOST_STATIC_ASSERT_MSG((N > 0) == true, "root N must be > 0!");
-  BOOST_STATIC_ASSERT_MSG((N > 1000) == false, "root N is too big!");
+  BOOST_MATH_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
+  BOOST_MATH_STATIC_ASSERT_MSG((N > 0) == true, "root N must be > 0!");
+  BOOST_MATH_STATIC_ASSERT_MSG((N > 1000) == false, "root N is too big!");
 
   typedef double guess_type; // double may restrict (exponent) range for a multiprecision T?
 
diff --git a/example/root_finding_start_locations.cpp b/example/root_finding_start_locations.cpp
index ba1e437af..669bddfa4 100644
--- a/example/root_finding_start_locations.cpp
+++ b/example/root_finding_start_locations.cpp
@@ -186,7 +186,7 @@ boost::uintmax_t elliptic_root_noderiv(T radius, T arc, T guess)
 template 
 struct elliptic_root_functor_1deriv
 { // Functor also returning 1st derivative.
-   BOOST_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
+   BOOST_MATH_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
 
    elliptic_root_functor_1deriv(T const& arc, T const& radius) : m_arc(arc), m_radius(radius)
    { // Constructor just stores value a to find root of.
@@ -220,7 +220,7 @@ boost::uintmax_t elliptic_root_1deriv(T radius, T arc, T guess)
    using namespace std;  // Help ADL of std functions.
    using namespace boost::math::tools; // For newton_raphson_iterate.
 
-   BOOST_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
+   BOOST_MATH_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
 
    T min = 0;   // Minimum possible value is zero.
    T max = arc; // Maximum possible value is the arc length.
@@ -237,7 +237,7 @@ boost::uintmax_t elliptic_root_1deriv(T radius, T arc, T guess)
 template 
 struct elliptic_root_functor_2deriv
 { // Functor returning both 1st and 2nd derivatives.
-   BOOST_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
+   BOOST_MATH_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
 
    elliptic_root_functor_2deriv(T const& arc, T const& radius) : m_arc(arc), m_radius(radius) {}
    std::tuple operator()(T const& x)
@@ -269,7 +269,7 @@ boost::uintmax_t elliptic_root_2deriv(T radius, T arc, T guess)
    using namespace std;                // Help ADL of std functions.
    using namespace boost::math::tools; // For halley_iterate.
 
-   BOOST_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
+   BOOST_MATH_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
 
    T min = 0;                                   // Minimum possible value is zero.
    T max = arc;                                 // radius can't be larger than the arc length.
@@ -292,7 +292,7 @@ boost::uintmax_t elliptic_root_2deriv_s(T radius, T arc, T guess)
    using namespace std;  // Help ADL of std functions.
    using namespace boost::math::tools; // For schroder_iterate.
 
-   BOOST_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
+   BOOST_MATH_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
 
    T min = 0; // Minimum possible value is zero.
    T max = arc; // radius can't be larger than the arc length.
diff --git a/example/root_n_finding_algorithms.cpp b/example/root_n_finding_algorithms.cpp
index 70f017923..926d487a3 100644
--- a/example/root_n_finding_algorithms.cpp
+++ b/example/root_n_finding_algorithms.cpp
@@ -224,8 +224,8 @@ T nth_root_noderiv(T x)
 template 
 struct nth_root_functor_1deriv
 { // Functor also returning 1st derivative.
-  BOOST_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
-  BOOST_STATIC_ASSERT_MSG((N > 0) == true, "root N must be > 0!");
+  BOOST_MATH_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
+  BOOST_MATH_STATIC_ASSERT_MSG((N > 0) == true, "root N must be > 0!");
 
   nth_root_functor_1deriv(T const& to_find_root_of) : a(to_find_root_of)
   { // Constructor stores value a to find root of, for example:
@@ -247,9 +247,9 @@ T nth_root_1deriv(T x)
   using namespace std;  // Help ADL of std functions.
   using namespace boost::math::tools; // For newton_raphson_iterate.
 
-  BOOST_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
-  BOOST_STATIC_ASSERT_MSG((N > 0) == true, "root N must be > 0!");
-  BOOST_STATIC_ASSERT_MSG((N > 1000) == false, "root N is too big!");
+  BOOST_MATH_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
+  BOOST_MATH_STATIC_ASSERT_MSG((N > 0) == true, "root N must be > 0!");
+  BOOST_MATH_STATIC_ASSERT_MSG((N > 1000) == false, "root N is too big!");
 
   typedef double guess_type;
 
@@ -273,8 +273,8 @@ T nth_root_1deriv(T x)
 template 
 struct nth_root_functor_2deriv
 { // Functor returning both 1st and 2nd derivatives.
-  BOOST_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
-  BOOST_STATIC_ASSERT_MSG((N > 0) == true, "root N must be > 0!");
+  BOOST_MATH_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
+  BOOST_MATH_STATIC_ASSERT_MSG((N > 0) == true, "root N must be > 0!");
 
   nth_root_functor_2deriv(T const& to_find_root_of) : a(to_find_root_of)
   { // Constructor stores value a to find root of, for example:
@@ -299,9 +299,9 @@ T nth_root_2deriv(T x)
   using namespace std;  // Help ADL of std functions.
   using namespace boost::math::tools; // For halley_iterate.
 
-  BOOST_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
-  BOOST_STATIC_ASSERT_MSG((N > 0) == true, "root N must be > 0!");
-  BOOST_STATIC_ASSERT_MSG((N > 1000) == false, "root N is too big!");
+  BOOST_MATH_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
+  BOOST_MATH_STATIC_ASSERT_MSG((N > 0) == true, "root N must be > 0!");
+  BOOST_MATH_STATIC_ASSERT_MSG((N > 1000) == false, "root N is too big!");
 
   typedef double guess_type;
 
@@ -328,9 +328,9 @@ T nth_root_2deriv_s(T x)
   using namespace std;  // Help ADL of std functions.
   using namespace boost::math::tools; // For schroder_iterate.
 
-  BOOST_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
-  BOOST_STATIC_ASSERT_MSG((N > 0) == true, "root N must be > 0!");
-  BOOST_STATIC_ASSERT_MSG((N > 1000) == false, "root N is too big!");
+  BOOST_MATH_STATIC_ASSERT_MSG(boost::is_integral::value == false, "Only floating-point type types can be used!");
+  BOOST_MATH_STATIC_ASSERT_MSG((N > 0) == true, "root N must be > 0!");
+  BOOST_MATH_STATIC_ASSERT_MSG((N > 1000) == false, "root N is too big!");
 
   typedef double guess_type;
 
diff --git a/include/boost/math/constants/calculate_constants.hpp b/include/boost/math/constants/calculate_constants.hpp
index 22ac2ff90..5c99f2d69 100644
--- a/include/boost/math/constants/calculate_constants.hpp
+++ b/include/boost/math/constants/calculate_constants.hpp
@@ -7,7 +7,7 @@
 
 #ifndef BOOST_MATH_CALCULATE_CONSTANTS_CONSTANTS_INCLUDED
 #define BOOST_MATH_CALCULATE_CONSTANTS_CONSTANTS_INCLUDED
-#include 
+#include 
 #include 
 
 namespace boost{ namespace math{ namespace constants{ namespace detail{
@@ -1003,7 +1003,7 @@ inline T constant_first_feigenbaum::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE
    // Also: https://oeis.org/A006890
    // N is in binary digits; so we multiply by log_2(10)
 
-   BOOST_STATIC_ASSERT_MSG(N < 3.321*1018, "\nThe first Feigenbaum constant cannot be computed at runtime; it is too expensive. It is known to 1018 decimal digits; you must request less than that.");
+   BOOST_MATH_STATIC_ASSERT_MSG(N < 3.321*1018, "\nThe first Feigenbaum constant cannot be computed at runtime; it is too expensive. It is known to 1018 decimal digits; you must request less than that.");
    T alpha{"4.6692016091029906718532038204662016172581855774757686327456513430041343302113147371386897440239480138171659848551898151344086271420279325223124429888908908599449354632367134115324817142199474556443658237932020095610583305754586176522220703854106467494942849814533917262005687556659523398756038256372256480040951071283890611844702775854285419801113440175002428585382498335715522052236087250291678860362674527213399057131606875345083433934446103706309452019115876972432273589838903794946257251289097948986768334611626889116563123474460575179539122045562472807095202198199094558581946136877445617396074115614074243754435499204869180982648652368438702799649017397793425134723808737136211601860128186102056381818354097598477964173900328936171432159878240789776614391395764037760537119096932066998361984288981837003229412030210655743295550388845849737034727532121925706958414074661841981961006129640161487712944415901405467941800198133253378592493365883070459999938375411726563553016862529032210862320550634510679399023341675"};
    return alpha;
 }
diff --git a/include/boost/math/cstdfloat/cstdfloat_cmath.hpp b/include/boost/math/cstdfloat/cstdfloat_cmath.hpp
index 771e10043..4ccd8c335 100644
--- a/include/boost/math/cstdfloat/cstdfloat_cmath.hpp
+++ b/include/boost/math/cstdfloat/cstdfloat_cmath.hpp
@@ -21,7 +21,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
diff --git a/include/boost/math/cstdfloat/cstdfloat_iostream.hpp b/include/boost/math/cstdfloat/cstdfloat_iostream.hpp
index e05a18224..93dc0c2da 100644
--- a/include/boost/math/cstdfloat/cstdfloat_iostream.hpp
+++ b/include/boost/math/cstdfloat/cstdfloat_iostream.hpp
@@ -28,7 +28,7 @@
   #include 
   #include 
   #include 
-  #include 
+  #include 
   #include 
 
 //  #if (0)
diff --git a/include/boost/math/cstdfloat/cstdfloat_types.hpp b/include/boost/math/cstdfloat/cstdfloat_types.hpp
index b0d9b972e..9a95d5591 100644
--- a/include/boost/math/cstdfloat/cstdfloat_types.hpp
+++ b/include/boost/math/cstdfloat/cstdfloat_types.hpp
@@ -14,7 +14,7 @@
 
   #include 
   #include 
-  #include 
+  #include 
   #include 
 
   // This is the beginning of the preamble.
@@ -334,10 +334,10 @@
       typedef boost::float16_t float_fast16_t;
       typedef boost::float16_t float_least16_t;
 
-      BOOST_STATIC_ASSERT_MSG(std::numeric_limits::is_iec559    == true, "boost::float16_t has been detected in , but verification with std::numeric_limits fails");
-      BOOST_STATIC_ASSERT_MSG(std::numeric_limits::radix        ==    2, "boost::float16_t has been detected in , but verification with std::numeric_limits fails");
-      BOOST_STATIC_ASSERT_MSG(std::numeric_limits::digits       ==   11, "boost::float16_t has been detected in , but verification with std::numeric_limits fails");
-      BOOST_STATIC_ASSERT_MSG(std::numeric_limits::max_exponent ==   16, "boost::float16_t has been detected in , but verification with std::numeric_limits fails");
+      BOOST_MATH_STATIC_ASSERT_MSG(std::numeric_limits::is_iec559    == true, "boost::float16_t has been detected in , but verification with std::numeric_limits fails");
+      BOOST_MATH_STATIC_ASSERT_MSG(std::numeric_limits::radix        ==    2, "boost::float16_t has been detected in , but verification with std::numeric_limits fails");
+      BOOST_MATH_STATIC_ASSERT_MSG(std::numeric_limits::digits       ==   11, "boost::float16_t has been detected in , but verification with std::numeric_limits fails");
+      BOOST_MATH_STATIC_ASSERT_MSG(std::numeric_limits::max_exponent ==   16, "boost::float16_t has been detected in , but verification with std::numeric_limits fails");
 
       #undef BOOST_CSTDFLOAT_FLOAT_16_MIN
       #undef BOOST_CSTDFLOAT_FLOAT_16_MAX
@@ -348,10 +348,10 @@
       typedef boost::float32_t float_fast32_t;
       typedef boost::float32_t float_least32_t;
 
-      BOOST_STATIC_ASSERT_MSG(std::numeric_limits::is_iec559    == true, "boost::float32_t has been detected in , but verification with std::numeric_limits fails");
-      BOOST_STATIC_ASSERT_MSG(std::numeric_limits::radix        ==    2, "boost::float32_t has been detected in , but verification with std::numeric_limits fails");
-      BOOST_STATIC_ASSERT_MSG(std::numeric_limits::digits       ==   24, "boost::float32_t has been detected in , but verification with std::numeric_limits fails");
-      BOOST_STATIC_ASSERT_MSG(std::numeric_limits::max_exponent ==  128, "boost::float32_t has been detected in , but verification with std::numeric_limits fails");
+      BOOST_MATH_STATIC_ASSERT_MSG(std::numeric_limits::is_iec559    == true, "boost::float32_t has been detected in , but verification with std::numeric_limits fails");
+      BOOST_MATH_STATIC_ASSERT_MSG(std::numeric_limits::radix        ==    2, "boost::float32_t has been detected in , but verification with std::numeric_limits fails");
+      BOOST_MATH_STATIC_ASSERT_MSG(std::numeric_limits::digits       ==   24, "boost::float32_t has been detected in , but verification with std::numeric_limits fails");
+      BOOST_MATH_STATIC_ASSERT_MSG(std::numeric_limits::max_exponent ==  128, "boost::float32_t has been detected in , but verification with std::numeric_limits fails");
 
       #undef BOOST_CSTDFLOAT_FLOAT_32_MIN
       #undef BOOST_CSTDFLOAT_FLOAT_32_MAX
@@ -371,10 +371,10 @@
       typedef boost::float64_t float_fast64_t;
       typedef boost::float64_t float_least64_t;
 
-      BOOST_STATIC_ASSERT_MSG(std::numeric_limits::is_iec559    == true, "boost::float64_t has been detected in , but verification with std::numeric_limits fails");
-      BOOST_STATIC_ASSERT_MSG(std::numeric_limits::radix        ==    2, "boost::float64_t has been detected in , but verification with std::numeric_limits fails");
-      BOOST_STATIC_ASSERT_MSG(std::numeric_limits::digits       ==   53, "boost::float64_t has been detected in , but verification with std::numeric_limits fails");
-      BOOST_STATIC_ASSERT_MSG(std::numeric_limits::max_exponent == 1024, "boost::float64_t has been detected in , but verification with std::numeric_limits fails");
+      BOOST_MATH_STATIC_ASSERT_MSG(std::numeric_limits::is_iec559    == true, "boost::float64_t has been detected in , but verification with std::numeric_limits fails");
+      BOOST_MATH_STATIC_ASSERT_MSG(std::numeric_limits::radix        ==    2, "boost::float64_t has been detected in , but verification with std::numeric_limits fails");
+      BOOST_MATH_STATIC_ASSERT_MSG(std::numeric_limits::digits       ==   53, "boost::float64_t has been detected in , but verification with std::numeric_limits fails");
+      BOOST_MATH_STATIC_ASSERT_MSG(std::numeric_limits::max_exponent == 1024, "boost::float64_t has been detected in , but verification with std::numeric_limits fails");
 
       #undef BOOST_CSTDFLOAT_FLOAT_64_MIN
       #undef BOOST_CSTDFLOAT_FLOAT_64_MAX
@@ -385,10 +385,10 @@
       typedef boost::float80_t float_fast80_t;
       typedef boost::float80_t float_least80_t;
 
-      BOOST_STATIC_ASSERT_MSG(std::numeric_limits::is_iec559    ==  true, "boost::float80_t has been detected in , but verification with std::numeric_limits fails");
-      BOOST_STATIC_ASSERT_MSG(std::numeric_limits::radix        ==     2, "boost::float80_t has been detected in , but verification with std::numeric_limits fails");
-      BOOST_STATIC_ASSERT_MSG(std::numeric_limits::digits       ==    64, "boost::float80_t has been detected in , but verification with std::numeric_limits fails");
-      BOOST_STATIC_ASSERT_MSG(std::numeric_limits::max_exponent == 16384, "boost::float80_t has been detected in , but verification with std::numeric_limits fails");
+      BOOST_MATH_STATIC_ASSERT_MSG(std::numeric_limits::is_iec559    ==  true, "boost::float80_t has been detected in , but verification with std::numeric_limits fails");
+      BOOST_MATH_STATIC_ASSERT_MSG(std::numeric_limits::radix        ==     2, "boost::float80_t has been detected in , but verification with std::numeric_limits fails");
+      BOOST_MATH_STATIC_ASSERT_MSG(std::numeric_limits::digits       ==    64, "boost::float80_t has been detected in , but verification with std::numeric_limits fails");
+      BOOST_MATH_STATIC_ASSERT_MSG(std::numeric_limits::max_exponent == 16384, "boost::float80_t has been detected in , but verification with std::numeric_limits fails");
 
       #undef BOOST_CSTDFLOAT_FLOAT_80_MIN
       #undef BOOST_CSTDFLOAT_FLOAT_80_MAX
@@ -404,10 +404,10 @@
       // Support for std::numeric_limits is added in the detail
       // file .
       #else
-      BOOST_STATIC_ASSERT_MSG(std::numeric_limits::is_iec559    ==  true, "boost::float128_t has been detected in , but verification with std::numeric_limits fails");
-      BOOST_STATIC_ASSERT_MSG(std::numeric_limits::radix        ==     2, "boost::float128_t has been detected in , but verification with std::numeric_limits fails");
-      BOOST_STATIC_ASSERT_MSG(std::numeric_limits::digits       ==   113, "boost::float128_t has been detected in , but verification with std::numeric_limits fails");
-      BOOST_STATIC_ASSERT_MSG(std::numeric_limits::max_exponent == 16384, "boost::float128_t has been detected in , but verification with std::numeric_limits fails");
+      BOOST_MATH_STATIC_ASSERT_MSG(std::numeric_limits::is_iec559    ==  true, "boost::float128_t has been detected in , but verification with std::numeric_limits fails");
+      BOOST_MATH_STATIC_ASSERT_MSG(std::numeric_limits::radix        ==     2, "boost::float128_t has been detected in , but verification with std::numeric_limits fails");
+      BOOST_MATH_STATIC_ASSERT_MSG(std::numeric_limits::digits       ==   113, "boost::float128_t has been detected in , but verification with std::numeric_limits fails");
+      BOOST_MATH_STATIC_ASSERT_MSG(std::numeric_limits::max_exponent == 16384, "boost::float128_t has been detected in , but verification with std::numeric_limits fails");
       #endif
 
       #undef BOOST_CSTDFLOAT_FLOAT_128_MIN
diff --git a/include/boost/math/differentiation/finite_difference.hpp b/include/boost/math/differentiation/finite_difference.hpp
index 215f5b965..46903411e 100644
--- a/include/boost/math/differentiation/finite_difference.hpp
+++ b/include/boost/math/differentiation/finite_difference.hpp
@@ -251,7 +251,7 @@ namespace detail {
    Real finite_difference_derivative(const F, Real, Real*, const tag&)
    {
       // Always fails, but condition is template-arg-dependent so only evaluated if we get instantiated.
-      BOOST_STATIC_ASSERT_MSG(sizeof(Real) == 0, "Finite difference not implemented for this order: try 1, 2, 4, 6 or 8");
+      BOOST_MATH_STATIC_ASSERT_MSG(sizeof(Real) == 0, "Finite difference not implemented for this order: try 1, 2, 4, 6 or 8");
    }
 
 }
diff --git a/include/boost/math/distributions/cauchy.hpp b/include/boost/math/distributions/cauchy.hpp
index 8e2edfb03..0713ea763 100644
--- a/include/boost/math/distributions/cauchy.hpp
+++ b/include/boost/math/distributions/cauchy.hpp
@@ -271,7 +271,7 @@ template 
 inline RealType mean(const cauchy_distribution&)
 {  // There is no mean:
    typedef typename Policy::assert_undefined_type assert_type;
-   BOOST_STATIC_ASSERT(assert_type::value == 0);
+   BOOST_MATH_STATIC_ASSERT(assert_type::value == 0);
 
    return policies::raise_domain_error(
       "boost::math::mean(cauchy<%1%>&)",
@@ -285,7 +285,7 @@ inline RealType variance(const cauchy_distribution& /*dist*/)
 {
    // There is no variance:
    typedef typename Policy::assert_undefined_type assert_type;
-   BOOST_STATIC_ASSERT(assert_type::value == 0);
+   BOOST_MATH_STATIC_ASSERT(assert_type::value == 0);
 
    return policies::raise_domain_error(
       "boost::math::variance(cauchy<%1%>&)",
@@ -310,7 +310,7 @@ inline RealType skewness(const cauchy_distribution& /*dist*/)
 {
    // There is no skewness:
    typedef typename Policy::assert_undefined_type assert_type;
-   BOOST_STATIC_ASSERT(assert_type::value == 0);
+   BOOST_MATH_STATIC_ASSERT(assert_type::value == 0);
 
    return policies::raise_domain_error(
       "boost::math::skewness(cauchy<%1%>&)",
@@ -324,7 +324,7 @@ inline RealType kurtosis(const cauchy_distribution& /*dist*/)
 {
    // There is no kurtosis:
    typedef typename Policy::assert_undefined_type assert_type;
-   BOOST_STATIC_ASSERT(assert_type::value == 0);
+   BOOST_MATH_STATIC_ASSERT(assert_type::value == 0);
 
    return policies::raise_domain_error(
       "boost::math::kurtosis(cauchy<%1%>&)",
@@ -338,7 +338,7 @@ inline RealType kurtosis_excess(const cauchy_distribution& /*d
 {
    // There is no kurtosis excess:
    typedef typename Policy::assert_undefined_type assert_type;
-   BOOST_STATIC_ASSERT(assert_type::value == 0);
+   BOOST_MATH_STATIC_ASSERT(assert_type::value == 0);
 
    return policies::raise_domain_error(
       "boost::math::kurtosis_excess(cauchy<%1%>&)",
diff --git a/include/boost/math/distributions/detail/derived_accessors.hpp b/include/boost/math/distributions/detail/derived_accessors.hpp
index 169b4877b..e90e7494d 100644
--- a/include/boost/math/distributions/detail/derived_accessors.hpp
+++ b/include/boost/math/distributions/detail/derived_accessors.hpp
@@ -28,7 +28,7 @@
 //
 
 #include 
-#include 
+#include 
 
 #ifdef BOOST_MSVC
 # pragma warning(push)
diff --git a/include/boost/math/distributions/find_location.hpp b/include/boost/math/distributions/find_location.hpp
index d9f62cd7e..bff79e55c 100644
--- a/include/boost/math/distributions/find_location.hpp
+++ b/include/boost/math/distributions/find_location.hpp
@@ -12,7 +12,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 // using boost::math::policies::policy;
@@ -26,7 +26,7 @@ namespace boost
   // Function to find location of random variable z
   // to give probability p (given scale)
   // Applies to normal, lognormal, extreme value, Cauchy, (and symmetrical triangular),
-  // enforced by BOOST_STATIC_ASSERT below.
+  // enforced by BOOST_MATH_STATIC_ASSERT below.
 
     template 
     inline
@@ -42,8 +42,8 @@ namespace boost
       // Will fail to compile here if try to use with a distribution without scale & location,
       // for example pareto, and many others.  These tests are disabled by the pp-logic
       // above if the compiler doesn't support the SFINAE tricks used in the traits class.
-      BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution::value); 
-      BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value);
+      BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_distribution::value); 
+      BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value);
 #endif
       static const char* function = "boost::math::find_location&, %1%)";
 
diff --git a/include/boost/math/distributions/find_scale.hpp b/include/boost/math/distributions/find_scale.hpp
index e3baafc65..b74a1e29b 100644
--- a/include/boost/math/distributions/find_scale.hpp
+++ b/include/boost/math/distributions/find_scale.hpp
@@ -13,7 +13,7 @@
 #include 
 // using boost::math::policies::policy;
 #include 
-#include 
+#include 
 #include 
 #include 
 // using boost::math::complement; // will be needed by users who want complement,
@@ -40,8 +40,8 @@ namespace boost
       )
     {
 #if !defined(BOOST_NO_SFINAE) && !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
-      BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution::value); 
-      BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value); 
+      BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_distribution::value); 
+      BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value); 
 #endif
       static const char* function = "boost::math::find_scale(%1%, %1%, %1%, Policy)";
 
@@ -112,8 +112,8 @@ namespace boost
       //  << endl;
 
 #if !defined(BOOST_NO_SFINAE) && !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
-      BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution::value); 
-      BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value); 
+      BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_distribution::value); 
+      BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value); 
 #endif
       static const char* function = "boost::math::find_scale(complement(%1%, %1%, %1%, Policy))";
 
@@ -166,8 +166,8 @@ namespace boost
       //  << endl;
 
 #if !defined(BOOST_NO_SFINAE) && !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
-      BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution::value); 
-      BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value); 
+      BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_distribution::value); 
+      BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value); 
 #endif
       static const char* function = "boost::math::find_scale(complement(%1%, %1%, %1%, Policy))";
 
diff --git a/include/boost/math/distributions/non_central_beta.hpp b/include/boost/math/distributions/non_central_beta.hpp
index 94b35e7ec..e2972b500 100644
--- a/include/boost/math/distributions/non_central_beta.hpp
+++ b/include/boost/math/distributions/non_central_beta.hpp
@@ -800,7 +800,7 @@ namespace boost
       { // skewness = sqrt(l).
          const char* function = "boost::math::non_central_beta_distribution<%1%>::skewness()";
          typedef typename Policy::assert_undefined_type assert_type;
-         BOOST_STATIC_ASSERT(assert_type::value == 0);
+         BOOST_MATH_STATIC_ASSERT(assert_type::value == 0);
 
          return policies::raise_evaluation_error(
             function,
@@ -813,7 +813,7 @@ namespace boost
       {
          const char* function = "boost::math::non_central_beta_distribution<%1%>::kurtosis_excess()";
          typedef typename Policy::assert_undefined_type assert_type;
-         BOOST_STATIC_ASSERT(assert_type::value == 0);
+         BOOST_MATH_STATIC_ASSERT(assert_type::value == 0);
 
          return policies::raise_evaluation_error(
             function,
diff --git a/include/boost/math/policies/error_handling.hpp b/include/boost/math/policies/error_handling.hpp
index 124337ee8..cbe77687a 100644
--- a/include/boost/math/policies/error_handling.hpp
+++ b/include/boost/math/policies/error_handling.hpp
@@ -512,7 +512,7 @@ inline BOOST_MATH_CONSTEXPR TargetType raise_rounding_error(
 {
    // This may or may not do the right thing, but the user asked for the error
    // to be ignored so here we go anyway:
-   BOOST_STATIC_ASSERT(std::numeric_limits::is_specialized);
+   BOOST_MATH_STATIC_ASSERT(std::numeric_limits::is_specialized);
    return  val > 0 ? (std::numeric_limits::max)() : (std::numeric_limits::is_integer ? (std::numeric_limits::min)() : -(std::numeric_limits::max)());
 }
 
@@ -527,7 +527,7 @@ inline TargetType raise_rounding_error(
    errno = ERANGE;
    // This may or may not do the right thing, but the user asked for the error
    // to be silent so here we go anyway:
-   BOOST_STATIC_ASSERT(std::numeric_limits::is_specialized);
+   BOOST_MATH_STATIC_ASSERT(std::numeric_limits::is_specialized);
    return  val > 0 ? (std::numeric_limits::max)() : (std::numeric_limits::is_integer ? (std::numeric_limits::min)() : -(std::numeric_limits::max)());
 }
 
diff --git a/include/boost/math/special_functions/airy.hpp b/include/boost/math/special_functions/airy.hpp
index 599c02068..b27b4539c 100644
--- a/include/boost/math/special_functions/airy.hpp
+++ b/include/boost/math/special_functions/airy.hpp
@@ -362,7 +362,7 @@ inline T airy_ai_zero(int m, const Policy& /*pol*/)
       policies::discrete_quantile<>,
       policies::assert_undefined<> >::type forwarding_policy;
 
-   BOOST_STATIC_ASSERT_MSG(    false == std::numeric_limits::is_specialized
+   BOOST_MATH_STATIC_ASSERT_MSG(    false == std::numeric_limits::is_specialized
                            || (   true  == std::numeric_limits::is_specialized
                                && false == std::numeric_limits::is_integer),
                            "Airy value type must be a floating-point type.");
@@ -385,7 +385,7 @@ inline OutputIterator airy_ai_zero(
 {
    typedef T result_type;
 
-   BOOST_STATIC_ASSERT_MSG(    false == std::numeric_limits::is_specialized
+   BOOST_MATH_STATIC_ASSERT_MSG(    false == std::numeric_limits::is_specialized
                            || (   true  == std::numeric_limits::is_specialized
                                && false == std::numeric_limits::is_integer),
                            "Airy value type must be a floating-point type.");
@@ -419,7 +419,7 @@ inline T airy_bi_zero(int m, const Policy& /*pol*/)
       policies::discrete_quantile<>,
       policies::assert_undefined<> >::type forwarding_policy;
 
-   BOOST_STATIC_ASSERT_MSG(    false == std::numeric_limits::is_specialized
+   BOOST_MATH_STATIC_ASSERT_MSG(    false == std::numeric_limits::is_specialized
                            || (   true  == std::numeric_limits::is_specialized
                                && false == std::numeric_limits::is_integer),
                            "Airy value type must be a floating-point type.");
@@ -442,7 +442,7 @@ inline OutputIterator airy_bi_zero(
 {
    typedef T result_type;
 
-   BOOST_STATIC_ASSERT_MSG(    false == std::numeric_limits::is_specialized
+   BOOST_MATH_STATIC_ASSERT_MSG(    false == std::numeric_limits::is_specialized
                            || (   true  == std::numeric_limits::is_specialized
                                && false == std::numeric_limits::is_integer),
                            "Airy value type must be a floating-point type.");
diff --git a/include/boost/math/special_functions/bessel.hpp b/include/boost/math/special_functions/bessel.hpp
index 7b62424be..86c682eb0 100644
--- a/include/boost/math/special_functions/bessel.hpp
+++ b/include/boost/math/special_functions/bessel.hpp
@@ -645,7 +645,7 @@ inline typename detail::bessel_traits::result_type cyl_bessel_j_ze
       policies::discrete_quantile<>,
       policies::assert_undefined<> >::type forwarding_policy;
 
-   BOOST_STATIC_ASSERT_MSG(    false == std::numeric_limits::is_specialized
+   BOOST_MATH_STATIC_ASSERT_MSG(    false == std::numeric_limits::is_specialized
                            || (   true  == std::numeric_limits::is_specialized
                                && false == std::numeric_limits::is_integer),
                            "Order must be a floating-point type.");
@@ -656,7 +656,7 @@ inline typename detail::bessel_traits::result_type cyl_bessel_j_ze
 template 
 inline typename detail::bessel_traits >::result_type cyl_bessel_j_zero(T v, int m)
 {
-   BOOST_STATIC_ASSERT_MSG(    false == std::numeric_limits::is_specialized
+   BOOST_MATH_STATIC_ASSERT_MSG(    false == std::numeric_limits::is_specialized
                            || (   true  == std::numeric_limits::is_specialized
                                && false == std::numeric_limits::is_integer),
                            "Order must be a floating-point type.");
@@ -671,7 +671,7 @@ inline OutputIterator cyl_bessel_j_zero(T v,
                               OutputIterator out_it,
                               const Policy& pol)
 {
-   BOOST_STATIC_ASSERT_MSG(    false == std::numeric_limits::is_specialized
+   BOOST_MATH_STATIC_ASSERT_MSG(    false == std::numeric_limits::is_specialized
                            || (   true  == std::numeric_limits::is_specialized
                                && false == std::numeric_limits::is_integer),
                            "Order must be a floating-point type.");
@@ -706,7 +706,7 @@ inline typename detail::bessel_traits::result_type cyl_neumann_zer
       policies::discrete_quantile<>,
       policies::assert_undefined<> >::type forwarding_policy;
 
-   BOOST_STATIC_ASSERT_MSG(    false == std::numeric_limits::is_specialized
+   BOOST_MATH_STATIC_ASSERT_MSG(    false == std::numeric_limits::is_specialized
                            || (   true  == std::numeric_limits::is_specialized
                                && false == std::numeric_limits::is_integer),
                            "Order must be a floating-point type.");
@@ -717,7 +717,7 @@ inline typename detail::bessel_traits::result_type cyl_neumann_zer
 template 
 inline typename detail::bessel_traits >::result_type cyl_neumann_zero(T v, int m)
 {
-   BOOST_STATIC_ASSERT_MSG(    false == std::numeric_limits::is_specialized
+   BOOST_MATH_STATIC_ASSERT_MSG(    false == std::numeric_limits::is_specialized
                            || (   true  == std::numeric_limits::is_specialized
                                && false == std::numeric_limits::is_integer),
                            "Order must be a floating-point type.");
@@ -732,7 +732,7 @@ inline OutputIterator cyl_neumann_zero(T v,
                              OutputIterator out_it,
                              const Policy& pol)
 {
-   BOOST_STATIC_ASSERT_MSG(    false == std::numeric_limits::is_specialized
+   BOOST_MATH_STATIC_ASSERT_MSG(    false == std::numeric_limits::is_specialized
                            || (   true  == std::numeric_limits::is_specialized
                                && false == std::numeric_limits::is_integer),
                            "Order must be a floating-point type.");
diff --git a/include/boost/math/special_functions/beta.hpp b/include/boost/math/special_functions/beta.hpp
index 46d9a4f83..947f4d666 100644
--- a/include/boost/math/special_functions/beta.hpp
+++ b/include/boost/math/special_functions/beta.hpp
@@ -20,7 +20,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 
 namespace boost{ namespace math{
@@ -795,25 +795,25 @@ struct Pn_size
       ::boost::math::max_factorial::value >= 100 ? 50
    : ::boost::math::max_factorial::value >= ::boost::math::max_factorial::value ? 30
    : ::boost::math::max_factorial::value >= ::boost::math::max_factorial::value ? 15 : 1);
-   BOOST_STATIC_ASSERT(::boost::math::max_factorial::value >= ::boost::math::max_factorial::value);
+   BOOST_MATH_STATIC_ASSERT(::boost::math::max_factorial::value >= ::boost::math::max_factorial::value);
 };
 template <>
 struct Pn_size
 {
    BOOST_STATIC_CONSTANT(unsigned, value = 15); // ~8-15 digit accuracy
-   BOOST_STATIC_ASSERT(::boost::math::max_factorial::value >= 30);
+   BOOST_MATH_STATIC_ASSERT(::boost::math::max_factorial::value >= 30);
 };
 template <>
 struct Pn_size
 {
    BOOST_STATIC_CONSTANT(unsigned, value = 30); // 16-20 digit accuracy
-   BOOST_STATIC_ASSERT(::boost::math::max_factorial::value >= 60);
+   BOOST_MATH_STATIC_ASSERT(::boost::math::max_factorial::value >= 60);
 };
 template <>
 struct Pn_size
 {
    BOOST_STATIC_CONSTANT(unsigned, value = 50); // ~35-50 digit accuracy
-   BOOST_STATIC_ASSERT(::boost::math::max_factorial::value >= 100);
+   BOOST_MATH_STATIC_ASSERT(::boost::math::max_factorial::value >= 100);
 };
 
 template 
diff --git a/include/boost/math/special_functions/binomial.hpp b/include/boost/math/special_functions/binomial.hpp
index 348a6a53b..9a242d57d 100644
--- a/include/boost/math/special_functions/binomial.hpp
+++ b/include/boost/math/special_functions/binomial.hpp
@@ -20,7 +20,7 @@ namespace boost{ namespace math{
 template 
 T binomial_coefficient(unsigned n, unsigned k, const Policy& pol)
 {
-   BOOST_STATIC_ASSERT(!boost::is_integral::value);
+   BOOST_MATH_STATIC_ASSERT(!boost::is_integral::value);
    BOOST_MATH_STD_USING
    static const char* function = "boost::math::binomial_coefficient<%1%>(unsigned, unsigned)";
    if(k > n)
diff --git a/include/boost/math/special_functions/cbrt.hpp b/include/boost/math/special_functions/cbrt.hpp
index 0066222a9..1896c82aa 100644
--- a/include/boost/math/special_functions/cbrt.hpp
+++ b/include/boost/math/special_functions/cbrt.hpp
@@ -87,7 +87,7 @@ T cbrt_imp(T z, const Policy& pol)
 
    using shift_type = typename largest_cbrt_int_type::type;
 
-   BOOST_STATIC_ASSERT( ::std::numeric_limits::radix == 2);
+   BOOST_MATH_STATIC_ASSERT( ::std::numeric_limits::radix == 2);
 
    if(abs(i_exp3) < std::numeric_limits::digits)
    {
diff --git a/include/boost/math/special_functions/detail/fp_traits.hpp b/include/boost/math/special_functions/detail/fp_traits.hpp
index 33fd7d4d7..c0f5b5914 100644
--- a/include/boost/math/special_functions/detail/fp_traits.hpp
+++ b/include/boost/math/special_functions/detail/fp_traits.hpp
@@ -26,7 +26,7 @@ With these techniques, the code could be simplified.
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 
 #ifdef BOOST_NO_STDC_NAMESPACE
@@ -222,7 +222,7 @@ private:
 #elif BOOST_ENDIAN_LITTLE_BYTE
     BOOST_STATIC_CONSTANT(int, offset_ = 4);
 #else
-    BOOST_STATIC_ASSERT(false);
+    BOOST_MATH_STATIC_ASSERT(false);
 #endif
 };
 
@@ -282,7 +282,7 @@ private:
 #elif BOOST_ENDIAN_LITTLE_BYTE
     BOOST_STATIC_CONSTANT(int, offset_ = 4);
 #else
-    BOOST_STATIC_ASSERT(false);
+    BOOST_MATH_STATIC_ASSERT(false);
 #endif
 };
 
@@ -396,7 +396,7 @@ private:
 #elif BOOST_ENDIAN_LITTLE_BYTE
     BOOST_STATIC_CONSTANT(int, offset_ = 12);
 #else
-    BOOST_STATIC_ASSERT(false);
+    BOOST_MATH_STATIC_ASSERT(false);
 #endif
 };
 
@@ -477,7 +477,7 @@ private:
 #elif BOOST_ENDIAN_LITTLE_BYTE
     BOOST_STATIC_CONSTANT(int, offset_ = 12);
 #else
-    BOOST_STATIC_ASSERT(false);
+    BOOST_MATH_STATIC_ASSERT(false);
 #endif
 };
 
diff --git a/include/boost/math/special_functions/detail/lanczos_sse2.hpp b/include/boost/math/special_functions/detail/lanczos_sse2.hpp
index 2ebde18e0..75aeff4d1 100644
--- a/include/boost/math/special_functions/detail/lanczos_sse2.hpp
+++ b/include/boost/math/special_functions/detail/lanczos_sse2.hpp
@@ -210,7 +210,7 @@ inline double lanczos13m53::lanczos_sum_expG_scaled(const double& x)
 
 #ifdef _MSC_VER
 
-BOOST_STATIC_ASSERT(sizeof(double) == sizeof(long double));
+BOOST_MATH_STATIC_ASSERT(sizeof(double) == sizeof(long double));
 
 template <>
 inline long double lanczos13m53::lanczos_sum(const long double& x)
diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp
index ccdd6e559..36fe9290c 100644
--- a/include/boost/math/special_functions/detail/polygamma.hpp
+++ b/include/boost/math/special_functions/detail/polygamma.hpp
@@ -22,7 +22,7 @@
   #include 
   #include 
   #include 
-  #include 
+  #include 
   #include 
 
 #ifdef _MSC_VER
diff --git a/include/boost/math/special_functions/detail/unchecked_factorial.hpp b/include/boost/math/special_functions/detail/unchecked_factorial.hpp
index ce7fafefa..e69b87a14 100644
--- a/include/boost/math/special_functions/detail/unchecked_factorial.hpp
+++ b/include/boost/math/special_functions/detail/unchecked_factorial.hpp
@@ -702,7 +702,7 @@ const typename unchecked_factorial_initializer::init unchecked_factorial_init
 template 
 inline T unchecked_factorial_imp(unsigned i, const std::integral_constant&)
 {
-   BOOST_STATIC_ASSERT(!boost::is_integral::value);
+   BOOST_MATH_STATIC_ASSERT(!boost::is_integral::value);
    // factorial(n) is not implemented
    // because it would overflow integral type T for too small n
    // to be useful. Use instead a floating-point type,
@@ -822,7 +822,7 @@ inline T unchecked_factorial_imp(unsigned i, const std::integral_constant
 inline T unchecked_factorial_imp(unsigned i, const std::integral_constant&)
 {
-   BOOST_STATIC_ASSERT(!boost::is_integral::value);
+   BOOST_MATH_STATIC_ASSERT(!boost::is_integral::value);
    // factorial(n) is not implemented
    // because it would overflow integral type T for too small n
    // to be useful. Use instead a floating-point type,
diff --git a/include/boost/math/special_functions/expm1.hpp b/include/boost/math/special_functions/expm1.hpp
index 49fc99508..ad51e1c6d 100644
--- a/include/boost/math/special_functions/expm1.hpp
+++ b/include/boost/math/special_functions/expm1.hpp
@@ -19,12 +19,7 @@
 #include 
 #include 
 #include 
-
-#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
-#  include 
-#else
-#  include 
-#endif
+#include 
 
 #if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128)
 //
diff --git a/include/boost/math/special_functions/factorials.hpp b/include/boost/math/special_functions/factorials.hpp
index 51224c2bc..f21bd6d6c 100644
--- a/include/boost/math/special_functions/factorials.hpp
+++ b/include/boost/math/special_functions/factorials.hpp
@@ -29,7 +29,7 @@ namespace boost { namespace math
 template 
 inline T factorial(unsigned i, const Policy& pol)
 {
-   BOOST_STATIC_ASSERT(!boost::is_integral::value);
+   BOOST_MATH_STATIC_ASSERT(!boost::is_integral::value);
    // factorial(n) is not implemented
    // because it would overflow integral type T for too small n
    // to be useful. Use instead a floating-point type,
@@ -73,7 +73,7 @@ inline double factorial(unsigned i)
 template 
 T double_factorial(unsigned i, const Policy& pol)
 {
-   BOOST_STATIC_ASSERT(!boost::is_integral::value);
+   BOOST_MATH_STATIC_ASSERT(!boost::is_integral::value);
    BOOST_MATH_STD_USING  // ADL lookup of std names
    if(i & 1)
    {
@@ -116,7 +116,7 @@ namespace detail{
 template 
 T rising_factorial_imp(T x, int n, const Policy& pol)
 {
-   BOOST_STATIC_ASSERT(!boost::is_integral::value);
+   BOOST_MATH_STATIC_ASSERT(!boost::is_integral::value);
    if(x < 0)
    {
       //
@@ -164,7 +164,7 @@ T rising_factorial_imp(T x, int n, const Policy& pol)
 template 
 inline T falling_factorial_imp(T x, unsigned n, const Policy& pol)
 {
-   BOOST_STATIC_ASSERT(!boost::is_integral::value);
+   BOOST_MATH_STATIC_ASSERT(!boost::is_integral::value);
    BOOST_MATH_STD_USING // ADL of std names
    if(x == 0)
       return 0;
diff --git a/include/boost/math/special_functions/lambert_w.hpp b/include/boost/math/special_functions/lambert_w.hpp
index 09ebbcc90..a03a72843 100644
--- a/include/boost/math/special_functions/lambert_w.hpp
+++ b/include/boost/math/special_functions/lambert_w.hpp
@@ -1620,7 +1620,7 @@ inline T lambert_w0_imp(T z, const Policy& pol, const std::integral_constant::digits >= 53,
+   BOOST_MATH_STATIC_ASSERT_MSG(std::numeric_limits::digits >= 53,
    "Our double precision coefficients will be truncated, "
    "please file a bug report with details of your platform's floating point types "
    "- or possibly edit the coefficients to have "
@@ -1744,7 +1744,7 @@ T lambert_wm1_imp(const T z, const Policy&  pol)
   // Integral types should be promoted to double by user Lambert w functions.
   // If integral type provided to user function lambert_w0 or lambert_wm1,
   // then should already have been promoted to double.
-  BOOST_STATIC_ASSERT_MSG(!boost::is_integral::value,
+  BOOST_MATH_STATIC_ASSERT_MSG(!boost::is_integral::value,
     "Must be floating-point or fixed type (not integer type), for example: lambert_wm1(1.), not lambert_wm1(1)!");
 
   BOOST_MATH_STD_USING // Aid argument dependent lookup (ADL) of abs.
diff --git a/include/boost/math/special_functions/log1p.hpp b/include/boost/math/special_functions/log1p.hpp
index cc0a4b12d..66b969497 100644
--- a/include/boost/math/special_functions/log1p.hpp
+++ b/include/boost/math/special_functions/log1p.hpp
@@ -12,8 +12,7 @@
 #pragma warning(disable:4702) // Unreachable code (release mode only warning)
 #endif
 
-#include 
-#include  // platform's ::log1p
+#include 
 #include 
 #include 
 #include 
@@ -21,12 +20,7 @@
 #include 
 #include 
 #include 
-
-#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
-#  include 
-#else
-#  include 
-#endif
+#include 
 
 #if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128)
 //
diff --git a/include/boost/math/special_functions/next.hpp b/include/boost/math/special_functions/next.hpp
index 22671cb04..344894985 100644
--- a/include/boost/math/special_functions/next.hpp
+++ b/include/boost/math/special_functions/next.hpp
@@ -72,8 +72,8 @@ inline const T& normalize_value(const T& val, const std::false_type&) { return v
 template 
 inline T normalize_value(const T& val, const std::true_type&) 
 {
-   BOOST_STATIC_ASSERT(std::numeric_limits::is_specialized);
-   BOOST_STATIC_ASSERT(std::numeric_limits::radix != 2);
+   BOOST_MATH_STATIC_ASSERT(std::numeric_limits::is_specialized);
+   BOOST_MATH_STATIC_ASSERT(std::numeric_limits::radix != 2);
 
    boost::intmax_t shift = (boost::intmax_t)std::numeric_limits::digits - (boost::intmax_t)ilogb(val) - 1;
    T result = scalbn(val, shift);
@@ -154,8 +154,8 @@ inline T calc_min_shifted(const std::true_type&)
 template 
 inline T calc_min_shifted(const std::false_type&)
 {
-   BOOST_STATIC_ASSERT(std::numeric_limits::is_specialized);
-   BOOST_STATIC_ASSERT(std::numeric_limits::radix != 2);
+   BOOST_MATH_STATIC_ASSERT(std::numeric_limits::is_specialized);
+   BOOST_MATH_STATIC_ASSERT(std::numeric_limits::radix != 2);
 
    return scalbn(tools::min_value(), std::numeric_limits::digits + 1);
 }
@@ -233,8 +233,8 @@ T float_next_imp(const T& val, const std::false_type&, const Policy& pol)
 {
    typedef typename exponent_type::type exponent_type;
 
-   BOOST_STATIC_ASSERT(std::numeric_limits::is_specialized);
-   BOOST_STATIC_ASSERT(std::numeric_limits::radix != 2);
+   BOOST_MATH_STATIC_ASSERT(std::numeric_limits::is_specialized);
+   BOOST_MATH_STATIC_ASSERT(std::numeric_limits::radix != 2);
 
    BOOST_MATH_STD_USING
    exponent_type expon;
@@ -368,8 +368,8 @@ T float_prior_imp(const T& val, const std::false_type&, const Policy& pol)
 {
    typedef typename exponent_type::type exponent_type;
 
-   BOOST_STATIC_ASSERT(std::numeric_limits::is_specialized);
-   BOOST_STATIC_ASSERT(std::numeric_limits::radix != 2);
+   BOOST_MATH_STATIC_ASSERT(std::numeric_limits::is_specialized);
+   BOOST_MATH_STATIC_ASSERT(std::numeric_limits::radix != 2);
 
    BOOST_MATH_STD_USING
    exponent_type expon;
@@ -573,8 +573,8 @@ T float_distance_imp(const T& a, const T& b, const std::true_type&, const Policy
 template 
 T float_distance_imp(const T& a, const T& b, const std::false_type&, const Policy& pol)
 {
-   BOOST_STATIC_ASSERT(std::numeric_limits::is_specialized);
-   BOOST_STATIC_ASSERT(std::numeric_limits::radix != 2);
+   BOOST_MATH_STATIC_ASSERT(std::numeric_limits::is_specialized);
+   BOOST_MATH_STATIC_ASSERT(std::numeric_limits::radix != 2);
 
    BOOST_MATH_STD_USING
    //
@@ -683,7 +683,7 @@ inline typename tools::promote_args::type float_distance(const T& a, const
    //
    // We allow ONE of a and b to be an integer type, otherwise both must be the SAME type.
    //
-   BOOST_STATIC_ASSERT_MSG(
+   BOOST_MATH_STATIC_ASSERT_MSG(
       (boost::is_same::value 
       || (boost::is_integral::value && !boost::is_integral::value) 
       || (!boost::is_integral::value && boost::is_integral::value)
@@ -805,8 +805,8 @@ T float_advance_imp(T val, int distance, const std::true_type&, const Policy& po
 template 
 T float_advance_imp(T val, int distance, const std::false_type&, const Policy& pol)
 {
-   BOOST_STATIC_ASSERT(std::numeric_limits::is_specialized);
-   BOOST_STATIC_ASSERT(std::numeric_limits::radix != 2);
+   BOOST_MATH_STATIC_ASSERT(std::numeric_limits::is_specialized);
+   BOOST_MATH_STATIC_ASSERT(std::numeric_limits::radix != 2);
 
    BOOST_MATH_STD_USING
    //
diff --git a/include/boost/math/special_functions/ulp.hpp b/include/boost/math/special_functions/ulp.hpp
index 72af8c397..f1f364c2a 100644
--- a/include/boost/math/special_functions/ulp.hpp
+++ b/include/boost/math/special_functions/ulp.hpp
@@ -52,8 +52,8 @@ T ulp_imp(const T& val, const std::true_type&, const Policy& pol)
 template 
 T ulp_imp(const T& val, const std::false_type&, const Policy& pol)
 {
-   BOOST_STATIC_ASSERT(std::numeric_limits::is_specialized);
-   BOOST_STATIC_ASSERT(std::numeric_limits::radix != 2);
+   BOOST_MATH_STATIC_ASSERT(std::numeric_limits::is_specialized);
+   BOOST_MATH_STATIC_ASSERT(std::numeric_limits::radix != 2);
    BOOST_MATH_STD_USING
    int expon;
    static const char* function = "ulp<%1%>(%1%)";
diff --git a/include/boost/math/tools/assert.hpp b/include/boost/math/tools/assert.hpp
index 8e3027c0b..d2b82029d 100644
--- a/include/boost/math/tools/assert.hpp
+++ b/include/boost/math/tools/assert.hpp
@@ -9,14 +9,19 @@
 #ifndef BOOST_MATH_STANDALONE
 
 #include 
+#include 
 #define BOOST_MATH_ASSERT(expr) BOOST_ASSERT(expr)
 #define BOOST_MATH_ASSERT_MSG(expr, msg) BOOST_ASSERT_MSG(expr, msg)
+#define BOOST_MATH_STATIC_ASSERT(expr) BOOST_STATIC_ASSERT(expr)
+#define BOOST_MATH_STATIC_ASSERT_MSG(expr, msg) BOOST_STATIC_ASSERT_MSG(expr, msg)
 
 #else // Standalone mode - use cassert
 
 #include 
 #define BOOST_MATH_ASSERT(expr) assert(expr)
 #define BOOST_MATH_ASSERT_MSG(expr, msg) assert((expr)&&(msg))
+#define BOOST_MATH_STATIC_ASSERT(expr) static_assert(expr, #expr " failed")
+#define BOOST_MATH_STATIC_ASSERT_MSG(expr, msg) static_assert(expr, msg)
 
 #endif
 
diff --git a/include/boost/math/tools/convert_from_string.hpp b/include/boost/math/tools/convert_from_string.hpp
index 86b0f18fe..43532fa77 100644
--- a/include/boost/math/tools/convert_from_string.hpp
+++ b/include/boost/math/tools/convert_from_string.hpp
@@ -27,7 +27,7 @@ namespace boost{ namespace math{ namespace tools{
    {
 #ifdef BOOST_MATH_NO_LEXICAL_CAST
       // This function should not compile, we don't have the necessary functionality to support it:
-      BOOST_STATIC_ASSERT(sizeof(Real) == 0);
+      BOOST_MATH_STATIC_ASSERT(sizeof(Real) == 0);
 #else
       return boost::lexical_cast(p);
 #endif
diff --git a/include/boost/math/tools/polynomial_gcd.hpp b/include/boost/math/tools/polynomial_gcd.hpp
index 419ddbf06..05b1c7081 100644
--- a/include/boost/math/tools/polynomial_gcd.hpp
+++ b/include/boost/math/tools/polynomial_gcd.hpp
@@ -177,7 +177,7 @@ template 
 typename enable_if_c::is_integer && std::numeric_limits::is_bounded, polynomial >::type
 gcd(polynomial const &u, polynomial const &v)
 {
-   BOOST_STATIC_ASSERT_MSG(sizeof(v) == 0, "GCD on polynomials of bounded integers is disallowed due to the excessive growth in the size of intermediate terms.");
+   BOOST_MATH_STATIC_ASSERT_MSG(sizeof(v) == 0, "GCD on polynomials of bounded integers is disallowed due to the excessive growth in the size of intermediate terms.");
    return subresultant_gcd(u, v);
 }
 // GCD over polynomials of floats can go via the Euclid algorithm:
diff --git a/include/boost/math/tools/precision.hpp b/include/boost/math/tools/precision.hpp
index 8a1199ece..3d74d56c0 100644
--- a/include/boost/math/tools/precision.hpp
+++ b/include/boost/math/tools/precision.hpp
@@ -12,7 +12,7 @@
 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -41,8 +41,8 @@ template 
 inline BOOST_MATH_CONSTEXPR int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(T)) BOOST_NOEXCEPT
 {
 #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
-   BOOST_STATIC_ASSERT( ::std::numeric_limits::is_specialized);
-   BOOST_STATIC_ASSERT( ::std::numeric_limits::radix == 2 || ::std::numeric_limits::radix == 10);
+   BOOST_MATH_STATIC_ASSERT( ::std::numeric_limits::is_specialized);
+   BOOST_MATH_STATIC_ASSERT( ::std::numeric_limits::radix == 2 || ::std::numeric_limits::radix == 10);
 #else
    BOOST_MATH_ASSERT(::std::numeric_limits::is_specialized);
    BOOST_MATH_ASSERT(::std::numeric_limits::radix == 2 || ::std::numeric_limits::radix == 10);
@@ -56,7 +56,7 @@ template 
 inline BOOST_MATH_CONSTEXPR T max_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T))  BOOST_MATH_NOEXCEPT(T)
 {
 #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
-   BOOST_STATIC_ASSERT( ::std::numeric_limits::is_specialized);
+   BOOST_MATH_STATIC_ASSERT( ::std::numeric_limits::is_specialized);
 #else
    BOOST_MATH_ASSERT(::std::numeric_limits::is_specialized);
 #endif
@@ -68,7 +68,7 @@ template 
 inline BOOST_MATH_CONSTEXPR T min_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) BOOST_MATH_NOEXCEPT(T)
 {
 #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
-   BOOST_STATIC_ASSERT( ::std::numeric_limits::is_specialized);
+   BOOST_MATH_STATIC_ASSERT( ::std::numeric_limits::is_specialized);
 #else
    BOOST_MATH_ASSERT(::std::numeric_limits::is_specialized);
 #endif
@@ -171,7 +171,7 @@ inline BOOST_MATH_CONSTEXPR long double epsilon(const std::true_typ
    //
    // This static assert fails for some unknown reason, so
    // disabled for now...
-   // BOOST_STATIC_ASSERT(std::numeric_limits::digits == 106);
+   // BOOST_MATH_STATIC_ASSERT(std::numeric_limits::digits == 106);
    return 2.4651903288156618919116517665087e-32L;
 }
 #endif
@@ -196,7 +196,7 @@ struct log_limit_traits
       std::integral_constant
    >::type tag_type;
    BOOST_STATIC_CONSTANT(bool, value = tag_type::value ? true : false);
-   BOOST_STATIC_ASSERT(::std::numeric_limits::is_specialized || (value == 0));
+   BOOST_MATH_STATIC_ASSERT(::std::numeric_limits::is_specialized || (value == 0));
 };
 
 template  struct log_limit_noexcept_traits_imp : public log_limit_traits {};
diff --git a/include/boost/math/tools/promotion.hpp b/include/boost/math/tools/promotion.hpp
index 45b74ceef..a3d414810 100644
--- a/include/boost/math/tools/promotion.hpp
+++ b/include/boost/math/tools/promotion.hpp
@@ -26,7 +26,7 @@
 #include 
 
 #ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
-#include 
+#include 
 #endif
 
 namespace boost
@@ -135,7 +135,7 @@ namespace boost
          //
          // Guard against use of long double if it's not supported:
          //
-         BOOST_STATIC_ASSERT_MSG((0 == std::is_same::value), "Sorry, but this platform does not have sufficient long double support for the special functions to be reliably implemented.");
+         BOOST_MATH_STATIC_ASSERT_MSG((0 == std::is_same::value), "Sorry, but this platform does not have sufficient long double support for the special functions to be reliably implemented.");
 #endif
       };
 
diff --git a/include/boost/math/tr1.hpp b/include/boost/math/tr1.hpp
index bb5f85146..e70cdd3bf 100644
--- a/include/boost/math/tr1.hpp
+++ b/include/boost/math/tr1.hpp
@@ -16,7 +16,7 @@
 #ifdef __cplusplus
 
 #include 
-#include 
+#include 
 
 namespace boost{ namespace math{ namespace tr1{ extern "C"{
 
@@ -737,37 +737,37 @@ inline typename tools::promote_args::type trunc BOOST_PREVENT_MACRO_SUBSTITUT
 # define NO_MACRO_EXPAND /**/
 // C99 macros defined as C++ templates
 template bool signbit NO_MACRO_EXPAND(T x)
-{ BOOST_STATIC_ASSERT(sizeof(T) == 0); return false; } // must not be instantiated
+{ BOOST_MATH_STATIC_ASSERT(sizeof(T) == 0); return false; } // must not be instantiated
 template<> bool BOOST_MATH_TR1_DECL signbit NO_MACRO_EXPAND(float x);
 template<> bool BOOST_MATH_TR1_DECL signbit NO_MACRO_EXPAND(double x);
 template<> bool BOOST_MATH_TR1_DECL signbit NO_MACRO_EXPAND(long double x);
 
 template int fpclassify NO_MACRO_EXPAND(T x)
-{ BOOST_STATIC_ASSERT(sizeof(T) == 0); return false; } // must not be instantiated
+{ BOOST_MATH_STATIC_ASSERT(sizeof(T) == 0); return false; } // must not be instantiated
 template<> int BOOST_MATH_TR1_DECL fpclassify NO_MACRO_EXPAND(float x);
 template<> int BOOST_MATH_TR1_DECL fpclassify NO_MACRO_EXPAND(double x);
 template<> int BOOST_MATH_TR1_DECL fpclassify NO_MACRO_EXPAND(long double x);
 
 template bool isfinite NO_MACRO_EXPAND(T x)
-{ BOOST_STATIC_ASSERT(sizeof(T) == 0); return false; } // must not be instantiated
+{ BOOST_MATH_STATIC_ASSERT(sizeof(T) == 0); return false; } // must not be instantiated
 template<> bool BOOST_MATH_TR1_DECL isfinite NO_MACRO_EXPAND(float x);
 template<> bool BOOST_MATH_TR1_DECL isfinite NO_MACRO_EXPAND(double x);
 template<> bool BOOST_MATH_TR1_DECL isfinite NO_MACRO_EXPAND(long double x);
 
 template bool isinf NO_MACRO_EXPAND(T x)
-{ BOOST_STATIC_ASSERT(sizeof(T) == 0); return false; } // must not be instantiated
+{ BOOST_MATH_STATIC_ASSERT(sizeof(T) == 0); return false; } // must not be instantiated
 template<> bool BOOST_MATH_TR1_DECL isinf NO_MACRO_EXPAND(float x);
 template<> bool BOOST_MATH_TR1_DECL isinf NO_MACRO_EXPAND(double x);
 template<> bool BOOST_MATH_TR1_DECL isinf NO_MACRO_EXPAND(long double x);
 
 template bool isnan NO_MACRO_EXPAND(T x)
-{ BOOST_STATIC_ASSERT(sizeof(T) == 0); return false; } // must not be instantiated
+{ BOOST_MATH_STATIC_ASSERT(sizeof(T) == 0); return false; } // must not be instantiated
 template<> bool BOOST_MATH_TR1_DECL isnan NO_MACRO_EXPAND(float x);
 template<> bool BOOST_MATH_TR1_DECL isnan NO_MACRO_EXPAND(double x);
 template<> bool BOOST_MATH_TR1_DECL isnan NO_MACRO_EXPAND(long double x);
 
 template bool isnormal NO_MACRO_EXPAND(T x)
-{ BOOST_STATIC_ASSERT(sizeof(T) == 0); return false; } // must not be instantiated
+{ BOOST_MATH_STATIC_ASSERT(sizeof(T) == 0); return false; } // must not be instantiated
 template<> bool BOOST_MATH_TR1_DECL isnormal NO_MACRO_EXPAND(float x);
 template<> bool BOOST_MATH_TR1_DECL isnormal NO_MACRO_EXPAND(double x);
 template<> bool BOOST_MATH_TR1_DECL isnormal NO_MACRO_EXPAND(long double x);
diff --git a/test/Jamfile.v2 b/test/Jamfile.v2
index 9625fa8cc..634c135e4 100644
--- a/test/Jamfile.v2
+++ b/test/Jamfile.v2
@@ -1114,7 +1114,7 @@ test-suite interpolators :
    [ run catmull_rom_test.cpp ../../test/build//boost_unit_test_framework : : : TEST=3 [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] : catmull_rom_test_3 ]
    [ run compile_test/catmull_rom_incl_test.cpp compile_test_main  : : : [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] ]
    [ run compile_test/catmull_rom_concept_test.cpp compile_test_main   : : : [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] ]
-
+   [ run test_standalone_asserts.cpp ]
 ;
 
 test-suite quadrature :
diff --git a/test/compile_test/test_traits.cpp b/test/compile_test/test_traits.cpp
index 6af0ef360..63818f40a 100644
--- a/test/compile_test/test_traits.cpp
+++ b/test/compile_test/test_traits.cpp
@@ -5,52 +5,52 @@
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 #include 
-#include 
+#include 
 #include 
 
 using namespace boost::math;
 
-BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution::value == false);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution::value == false);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution >::value);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution >::value);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_distribution::value == false);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_distribution::value == false);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_distribution >::value);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_distribution >::value);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_distribution::value);
 
-BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution >::value == false);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution >::value == false);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
-BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution >::value == false);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution >::value == false);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
+BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value == false);
 
diff --git a/test/complex_test.cpp b/test/complex_test.cpp
index a11c11bd5..40f4f10e5 100644
--- a/test/complex_test.cpp
+++ b/test/complex_test.cpp
@@ -9,7 +9,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 
 #include 
diff --git a/test/float128/setup.hpp b/test/float128/setup.hpp
index f71f5c98e..ca1b16b25 100644
--- a/test/float128/setup.hpp
+++ b/test/float128/setup.hpp
@@ -12,12 +12,12 @@
 #define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
 
 #include 
-#include 
+#include 
 
 #define ALL_TESTS    test(boost::floatmax_t(0), "boost::floatmax_t");
 typedef boost::floatmax_t test_type_1;
    
-BOOST_STATIC_ASSERT_MSG(std::numeric_limits::digits == 113, "These tests should only be run for 128-bit floating point types.");
+BOOST_MATH_STATIC_ASSERT_MSG(std::numeric_limits::digits == 113, "These tests should only be run for 128-bit floating point types.");
 
 #ifndef BOOST_MATH_TEST_TYPE
 #define BOOST_TEST_MAIN
diff --git a/test/mpreal_concept_check.cpp b/test/mpreal_concept_check.cpp
index c0f11c93d..f41c4ca96 100644
--- a/test/mpreal_concept_check.cpp
+++ b/test/mpreal_concept_check.cpp
@@ -15,9 +15,9 @@
 #include 
 #include 
 #include "compile_test/instantiate.hpp"
-#include 
+#include 
 
-//BOOST_STATIC_ASSERT((boost::is_same::type >::value));
+//BOOST_MATH_STATIC_ASSERT((boost::is_same::type >::value));
 
 void foo()
 {
diff --git a/test/pow_test.cpp b/test/pow_test.cpp
index 6c45d893b..6b58a07bf 100644
--- a/test/pow_test.cpp
+++ b/test/pow_test.cpp
@@ -18,7 +18,7 @@
 
 #include 
 #include 
-#include 
+#include 
 
 #include 
 
@@ -100,15 +100,15 @@ void test_with_big_exponents()
 
 void test_return_types()
 {
-    BOOST_STATIC_ASSERT((is_same('\1')), double>::value));
-    BOOST_STATIC_ASSERT((is_same(L'\2')), double>::value));
-    BOOST_STATIC_ASSERT((is_same(3)), double>::value));
-    BOOST_STATIC_ASSERT((is_same(4u)), double>::value));
-    BOOST_STATIC_ASSERT((is_same(5ul)), double>::value));
-    BOOST_STATIC_ASSERT((is_same(6.0f)), float>::value));
-    BOOST_STATIC_ASSERT((is_same(7.0)), double>::value));
+    BOOST_MATH_STATIC_ASSERT((is_same('\1')), double>::value));
+    BOOST_MATH_STATIC_ASSERT((is_same(L'\2')), double>::value));
+    BOOST_MATH_STATIC_ASSERT((is_same(3)), double>::value));
+    BOOST_MATH_STATIC_ASSERT((is_same(4u)), double>::value));
+    BOOST_MATH_STATIC_ASSERT((is_same(5ul)), double>::value));
+    BOOST_MATH_STATIC_ASSERT((is_same(6.0f)), float>::value));
+    BOOST_MATH_STATIC_ASSERT((is_same(7.0)), double>::value));
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
-    BOOST_STATIC_ASSERT((is_same(7.0l)), long double>::value));
+    BOOST_MATH_STATIC_ASSERT((is_same(7.0l)), long double>::value));
 #endif
 }
 
diff --git a/test/test_find_scale.cpp b/test/test_find_scale.cpp
index 78421d166..a7ecdf752 100644
--- a/test/test_find_scale.cpp
+++ b/test/test_find_scale.cpp
@@ -97,7 +97,7 @@ void test_spots(RealType)
   // because they lack the scale and location attributes.
   // BOOST_MATH_CHECK_THROW(find_scale(0., 0.5, 0.), std::domain_error);
   // correctly fails to compile in find_scale() at
-  // BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value); 
+  // BOOST_MATH_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution::value); 
 
   // Check doesn't throw when an ignore_error for domain_error policy is used.
   using boost::math::policies::policy;
diff --git a/test/test_standalone_asserts.cpp b/test/test_standalone_asserts.cpp
new file mode 100644
index 000000000..8c4e224a1
--- /dev/null
+++ b/test/test_standalone_asserts.cpp
@@ -0,0 +1,19 @@
+//  (C) Copyright Matt Borland 2021.
+//  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_STANDALONE
+
+#include 
+
+int main(void)
+{
+    constexpr unsigned two = 2;
+    
+    BOOST_MATH_ASSERT(two == 2);
+    BOOST_MATH_ASSERT_MSG(two == 2, "Fails");
+
+    BOOST_MATH_STATIC_ASSERT(two == 2);
+    BOOST_MATH_STATIC_ASSERT_MSG(two == 2, "Fails");
+}
diff --git a/tools/doc/cstdfloat.qbk b/tools/doc/cstdfloat.qbk
index 2fa11cc43..c76f4d6df 100644
--- a/tools/doc/cstdfloat.qbk
+++ b/tools/doc/cstdfloat.qbk
@@ -124,7 +124,7 @@ Based on the results of these queries, an attempt is made to automatically
 detect the presence of built-in floating-point types having specified widths.
 An unequivocal test regarding conformance with __IEEE754 (IEC599) based on
 [@ http://en.cppreference.com/w/cpp/types/numeric_limits/is_iec559 `std::numeric_limits<>::is_iec559`]
-is performed with `BOOST_STATIC_ASSERT`.
+is performed with `BOOST_MATH_STATIC_ASSERT`.
 
 The header `` makes the standardized floating-point
 `typedef`s safely available in `namespace boost` without placing any names