diff --git a/include/boost/math/tools/centered_continued_fraction.hpp b/include/boost/math/tools/centered_continued_fraction.hpp index 2016ffd20..5f3e9b14f 100644 --- a/include/boost/math/tools/centered_continued_fraction.hpp +++ b/include/boost/math/tools/centered_continued_fraction.hpp @@ -12,7 +12,10 @@ #include #include #include + +#ifndef BOOST_MATH_STANDALONE #include +#endif namespace boost::math::tools { @@ -77,7 +80,11 @@ public: if (b_[i] == 0) { std::ostringstream oss; oss << "Found a zero partial denominator: b[" << i << "] = " << b_[i] << "." + #ifndef BOOST_MATH_STANDALONE << " This means the integer type '" << boost::core::demangle(typeid(Z).name()) + #else + << " This means the integer type '" << typeid(Z).name() + #endif << "' has overflowed and you need to use a wider type," << " or there is a bug."; throw std::overflow_error(oss.str()); diff --git a/include/boost/math/tools/simple_continued_fraction.hpp b/include/boost/math/tools/simple_continued_fraction.hpp index 4120c53b0..391a4ac70 100644 --- a/include/boost/math/tools/simple_continued_fraction.hpp +++ b/include/boost/math/tools/simple_continued_fraction.hpp @@ -12,7 +12,10 @@ #include #include #include + +#ifndef BOOST_MATH_STANDALONE #include +#endif namespace boost::math::tools { @@ -74,7 +77,11 @@ public: if (b_[i] <= 0) { std::ostringstream oss; oss << "Found a negative partial denominator: b[" << i << "] = " << b_[i] << "." + #ifndef BOOST_MATH_STANDALONE << " This means the integer type '" << boost::core::demangle(typeid(Z).name()) + #else + << " This means the integer type '" << typeid(Z).name() + #endif << "' has overflowed and you need to use a wider type," << " or there is a bug."; throw std::overflow_error(oss.str());