Only include <iosfwd> unless either EIGEN_DEBUG_ASSIGN is defined or we're in eigen2 support mode

This commit is contained in:
Benoit Jacob 2010-02-27 19:04:22 -05:00
parent e84f7e07e9
commit 27f5250258
4 changed files with 14 additions and 2 deletions

View File

@ -119,13 +119,18 @@
#include <complex> #include <complex>
#include <cassert> #include <cassert>
#include <functional> #include <functional>
#include <iostream> #include <iosfwd>
#include <cstring> #include <cstring>
#include <string> #include <string>
#include <limits> #include <limits>
// for min/max: // for min/max:
#include <algorithm> #include <algorithm>
// for outputting debug info
#ifdef EIGEN_DEBUG_ASSIGN
#include<iostream>
#endif
#if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(EIGEN_NO_EXCEPTIONS) #if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(EIGEN_NO_EXCEPTIONS)
#define EIGEN_EXCEPTIONS #define EIGEN_EXCEPTIONS
#endif #endif

View File

@ -26,7 +26,7 @@
#define EIGEN2SUPPORT_H #define EIGEN2SUPPORT_H
#if (!defined(EIGEN2_SUPPORT)) || (!defined(EIGEN_CORE_H)) #if (!defined(EIGEN2_SUPPORT)) || (!defined(EIGEN_CORE_H))
#error Eigen2 support must be enabled by defining EIGEN2_SUPPORT before any other Eigen header #error Eigen2 support must be enabled by defining EIGEN2_SUPPORT before including any Eigen header
#endif #endif
#include "src/Core/util/DisableMSVCWarnings.h" #include "src/Core/util/DisableMSVCWarnings.h"
@ -36,6 +36,7 @@ namespace Eigen {
/** \defgroup Eigen2Support_Module Eigen2 support module /** \defgroup Eigen2Support_Module Eigen2 support module
* This module provides a couple of deprecated functions improving the compatibility with Eigen2. * This module provides a couple of deprecated functions improving the compatibility with Eigen2.
* *
* To use it, define EIGEN2_SUPPORT before including any Eigen header
* \code * \code
* #define EIGEN2_SUPPORT * #define EIGEN2_SUPPORT
* \endcode * \endcode
@ -51,4 +52,7 @@ namespace Eigen {
#include "src/Core/util/EnableMSVCWarnings.h" #include "src/Core/util/EnableMSVCWarnings.h"
// Eigen2 used to include iostream
#include<iostream>
#endif // EIGEN2SUPPORT_H #endif // EIGEN2SUPPORT_H

View File

@ -105,6 +105,7 @@ public:
: int(NoUnrolling) : int(NoUnrolling)
}; };
#ifdef EIGEN_DEBUG_ASSIGN
static void debug() static void debug()
{ {
EIGEN_DEBUG_VAR(DstIsAligned) EIGEN_DEBUG_VAR(DstIsAligned)
@ -125,6 +126,7 @@ public:
EIGEN_DEBUG_VAR(MayUnrollInner) EIGEN_DEBUG_VAR(MayUnrollInner)
EIGEN_DEBUG_VAR(Unrolling) EIGEN_DEBUG_VAR(Unrolling)
} }
#endif
}; };
/*************************************************************************** /***************************************************************************

View File

@ -22,6 +22,7 @@
// License and a copy of the GNU General Public License along with // License and a copy of the GNU General Public License along with
// Eigen. If not, see <http://www.gnu.org/licenses/>. // Eigen. If not, see <http://www.gnu.org/licenses/>.
#define EIGEN_DEBUG_ASSIGN
#include "main.h" #include "main.h"
#include <typeinfo> #include <typeinfo>