|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r83532 - in trunk/boost/math: bindings bindings/detail special_functions tools
From: john_at_[hidden]
Date: 2013-03-23 13:05:17
Author: johnmaddock
Date: 2013-03-23 13:05:15 EDT (Sat, 23 Mar 2013)
New Revision: 83532
URL: http://svn.boost.org/trac/boost/changeset/83532
Log:
Reorganise header inclusion to minimise dependencies on <iostream> and <boost/lexical_cast.hpp>.
Refs #8327.
Text files modified:
trunk/boost/math/bindings/detail/big_digamma.hpp | 1 +
trunk/boost/math/bindings/detail/big_lanczos.hpp | 1 -
trunk/boost/math/bindings/e_float.hpp | 1 +
trunk/boost/math/bindings/mpfr.hpp | 1 +
trunk/boost/math/special_functions/factorials.hpp | 1 -
trunk/boost/math/special_functions/gamma.hpp | 17 -----------------
trunk/boost/math/tools/config.hpp | 18 +++++++++++++-----
trunk/boost/math/tools/precision.hpp | 2 --
trunk/boost/math/tools/test.hpp | 2 ++
9 files changed, 18 insertions(+), 26 deletions(-)
Modified: trunk/boost/math/bindings/detail/big_digamma.hpp
==============================================================================
--- trunk/boost/math/bindings/detail/big_digamma.hpp (original)
+++ trunk/boost/math/bindings/detail/big_digamma.hpp 2013-03-23 13:05:15 EDT (Sat, 23 Mar 2013)
@@ -9,6 +9,7 @@
#include <boost/math/tools/rational.hpp>
#include <boost/math/policies/error_handling.hpp>
#include <boost/math/constants/constants.hpp>
+#include <boost/lexical_cast.hpp>
namespace boost{ namespace math{ namespace detail{
Modified: trunk/boost/math/bindings/detail/big_lanczos.hpp
==============================================================================
--- trunk/boost/math/bindings/detail/big_lanczos.hpp (original)
+++ trunk/boost/math/bindings/detail/big_lanczos.hpp 2013-03-23 13:05:15 EDT (Sat, 23 Mar 2013)
@@ -7,7 +7,6 @@
#define BOOST_BIG_LANCZOS_HPP
#include <boost/math/special_functions/lanczos.hpp>
-#include <boost/lexical_cast.hpp>
namespace boost{ namespace math{ namespace lanczos{
Modified: trunk/boost/math/bindings/e_float.hpp
==============================================================================
--- trunk/boost/math/bindings/e_float.hpp (original)
+++ trunk/boost/math/bindings/e_float.hpp 2013-03-23 13:05:15 EDT (Sat, 23 Mar 2013)
@@ -25,6 +25,7 @@
#include <boost/math/special_functions/fpclassify.hpp>
#include <boost/math/bindings/detail/big_digamma.hpp>
#include <boost/math/bindings/detail/big_lanczos.hpp>
+#include <boost/lexical_cast.hpp>
namespace boost{ namespace math{ namespace ef{
Modified: trunk/boost/math/bindings/mpfr.hpp
==============================================================================
--- trunk/boost/math/bindings/mpfr.hpp (original)
+++ trunk/boost/math/bindings/mpfr.hpp 2013-03-23 13:05:15 EDT (Sat, 23 Mar 2013)
@@ -12,6 +12,7 @@
#define BOOST_MATH_MPLFR_BINDINGS_HPP
#include <boost/config.hpp>
+#include <boost/lexical_cast.hpp>
#ifdef BOOST_MSVC
//
Modified: trunk/boost/math/special_functions/factorials.hpp
==============================================================================
--- trunk/boost/math/special_functions/factorials.hpp (original)
+++ trunk/boost/math/special_functions/factorials.hpp 2013-03-23 13:05:15 EDT (Sat, 23 Mar 2013)
@@ -18,7 +18,6 @@
#pragma warning(push) // Temporary until lexical cast fixed.
#pragma warning(disable: 4127 4701)
#endif
-#include <boost/lexical_cast.hpp>
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
Modified: trunk/boost/math/special_functions/gamma.hpp
==============================================================================
--- trunk/boost/math/special_functions/gamma.hpp (original)
+++ trunk/boost/math/special_functions/gamma.hpp 2013-03-23 13:05:15 EDT (Sat, 23 Mar 2013)
@@ -14,17 +14,6 @@
#endif
#include <boost/config.hpp>
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable: 4127 4701)
-// // For lexical_cast, until fixed in 1.35?
-// // conditional expression is constant &
-// // Potentially uninitialized local variable 'name' used
-#endif
-#include <boost/lexical_cast.hpp>
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
#include <boost/math/tools/series.hpp>
#include <boost/math/tools/fraction.hpp>
#include <boost/math/tools/precision.hpp>
@@ -50,12 +39,6 @@
#include <boost/config/no_tr1/cmath.hpp>
#include <algorithm>
-#ifdef BOOST_MATH_INSTRUMENT
-#include <iostream>
-#include <iomanip>
-#include <typeinfo>
-#endif
-
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable: 4702) // unreachable code (return after domain_error throw).
Modified: trunk/boost/math/tools/config.hpp
==============================================================================
--- trunk/boost/math/tools/config.hpp (original)
+++ trunk/boost/math/tools/config.hpp 2013-03-23 13:05:15 EDT (Sat, 23 Mar 2013)
@@ -322,12 +322,20 @@
#endif
#ifdef BOOST_MATH_INSTRUMENT
-#define BOOST_MATH_INSTRUMENT_CODE(x) \
- std::cout << std::setprecision(35) << __FILE__ << ":" << __LINE__ << " " << x << std::endl;
-#define BOOST_MATH_INSTRUMENT_VARIABLE(name) BOOST_MATH_INSTRUMENT_CODE(BOOST_STRINGIZE(name) << " = " << name)
+
+# include <iostream>
+# include <iomanip>
+# include <typeinfo>
+
+# define BOOST_MATH_INSTRUMENT_CODE(x) \
+ std::cout << std::setprecision(35) << __FILE__ << ":" << __LINE__ << " " << x << std::endl;
+# define BOOST_MATH_INSTRUMENT_VARIABLE(name) BOOST_MATH_INSTRUMENT_CODE(BOOST_STRINGIZE(name) << " = " << name)
+
#else
-#define BOOST_MATH_INSTRUMENT_CODE(x)
-#define BOOST_MATH_INSTRUMENT_VARIABLE(name)
+
+# define BOOST_MATH_INSTRUMENT_CODE(x)
+# define BOOST_MATH_INSTRUMENT_VARIABLE(name)
+
#endif
#endif // BOOST_MATH_TOOLS_CONFIG_HPP
Modified: trunk/boost/math/tools/precision.hpp
==============================================================================
--- trunk/boost/math/tools/precision.hpp (original)
+++ trunk/boost/math/tools/precision.hpp 2013-03-23 13:05:15 EDT (Sat, 23 Mar 2013)
@@ -18,8 +18,6 @@
#include <boost/mpl/if.hpp>
#include <boost/math/policies/policy.hpp>
-#include <iostream>
-#include <iomanip>
// These two are for LDBL_MAN_DIG:
#include <limits.h>
#include <math.h>
Modified: trunk/boost/math/tools/test.hpp
==============================================================================
--- trunk/boost/math/tools/test.hpp (original)
+++ trunk/boost/math/tools/test.hpp 2013-03-23 13:05:15 EDT (Sat, 23 Mar 2013)
@@ -15,6 +15,8 @@
#include <boost/math/special_functions/fpclassify.hpp>
#include <boost/test/test_tools.hpp>
#include <stdexcept>
+#include <iostream>
+#include <iomanip>
namespace boost{ namespace math{ namespace tools{
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk