mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 20:56:00 +08:00
fig bug #373: compilation error with clang 2.9 when exceptions are disabled (cannot reproduce with clang 3.0 or 3.1)
This commit is contained in:
parent
b60624dc2a
commit
59576014a9
@ -87,7 +87,8 @@ inline void throw_std_bad_alloc()
|
|||||||
#ifdef EIGEN_EXCEPTIONS
|
#ifdef EIGEN_EXCEPTIONS
|
||||||
throw std::bad_alloc();
|
throw std::bad_alloc();
|
||||||
#else
|
#else
|
||||||
new int[size_t(-1)];
|
std::size_t huge = -1;
|
||||||
|
new int[huge];
|
||||||
#endif
|
#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.
|
// 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;
|
template<typename T, bool UseMemcpy> struct smart_copy_helper;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user