Throw std::bad_alloc even when exceptions are disabled, by doing new int[size_t(-1)].

Don't throw exceptions on aligned_malloc(0) (just because malloc's retval is null doesn't mean error, if size==0).
Remove EIGEN_NO_EXCEPTIONS option, use only compiler standard defines. Either exceptions are enabled or they aren't.
This commit is contained in:
Benoit Jacob
2011-10-17 08:44:44 -04:00
parent dcbc985a28
commit 16b638c159
3 changed files with 32 additions and 35 deletions

View File

@@ -167,7 +167,7 @@
#include <intrin.h>
#endif
#if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(EIGEN_NO_EXCEPTIONS)
#if defined(_CPPUNWIND) || defined(__EXCEPTIONS)
#define EIGEN_EXCEPTIONS
#endif