From 228920fad7f883e05d4c764697b5c30b861abde9 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Mon, 5 Dec 2011 09:44:25 +0100 Subject: [PATCH] fig bug #373: compilation error with clang 2.9 when exceptions are disabled (cannot reproduce with clang 3.0 or 3.1) (transplanted from 59576014a997d530df8d6f0e1191efc47b919ed1 ) --- Eigen/src/Core/util/Memory.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Eigen/src/Core/util/Memory.h b/Eigen/src/Core/util/Memory.h index e2c750ce8..023716dc9 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 }