Added EIGEN_REF_TO_TEMPORARY define for rvalue support.

Allowed VC10 to make use of static_assert.
This commit is contained in:
Hauke Heibel
2009-09-21 19:59:58 +02:00
parent c1c780a94f
commit c6822d6723
9 changed files with 22 additions and 14 deletions

View File

@@ -251,6 +251,13 @@ using Eigen::ei_cos;
// needed to define it here as escaping characters in CMake add_definition's argument seems very problematic.
#define EIGEN_DOCS_IO_FORMAT IOFormat(3, 0, " ", "\n", "", "")
// C++0x features
#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (defined(_MSC_VER) && (_MSC_VER >= 1600))
#define EIGEN_REF_TO_TEMPORARY &&
#else
#define EIGEN_REF_TO_TEMPORARY const &
#endif
#ifdef _MSC_VER
#define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived) \
using Base::operator =; \

View File

@@ -41,7 +41,7 @@
#ifndef EIGEN_NO_STATIC_ASSERT
#ifdef __GXX_EXPERIMENTAL_CXX0X__
#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (defined(_MSC_VER) && (_MSC_VER >= 1600))
// if native static_assert is enabled, let's use it
#define EIGEN_STATIC_ASSERT(X,MSG) static_assert(X,#MSG);