diff options
author | Gael Guennebaud <g.gael@free.fr> | 2011-12-05 09:44:25 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2011-12-05 09:44:25 +0100 |
commit | 59576014a997d530df8d6f0e1191efc47b919ed1 (patch) | |
tree | 7bb060723b185b839ae3b10035489d485437025e /Eigen/src/Core/util | |
parent | b60624dc2a626689034ba33fe7d571a93e01a382 (diff) |
fig bug #373: compilation error with clang 2.9 when exceptions are disabled (cannot reproduce with clang 3.0 or 3.1)
Diffstat (limited to 'Eigen/src/Core/util')
-rw-r--r-- | Eigen/src/Core/util/Memory.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Eigen/src/Core/util/Memory.h b/Eigen/src/Core/util/Memory.h index f63efbcf1..1b8f3a99c 100644 --- a/Eigen/src/Core/util/Memory.h +++ b/Eigen/src/Core/util/Memory.h @@ -87,7 +87,8 @@ inline void throw_std_bad_alloc() #ifdef EIGEN_EXCEPTIONS throw std::bad_alloc(); #else - new int[size_t(-1)]; + std::size_t huge = -1; + new int[huge]; #endif } @@ -483,7 +484,7 @@ inline static Index first_aligned(const Scalar* array, Index size) } -// std::copy is much slower than std::copy, so let's introduce a smart_copy which +// std::copy is much slower than memcpy, so let's introduce a smart_copy which // use memcpy on trivial types, i.e., on types that does not require an initialization ctor. template<typename T, bool UseMemcpy> struct smart_copy_helper; |