diff options
author | 2016-02-03 15:58:26 -0800 | |
---|---|---|
committer | 2016-02-03 15:58:26 -0800 | |
commit | 1cbb79cdfd4a43faf43f4095df456731d98961c0 (patch) | |
tree | 885011bc9f40f838f5e92164a90b64e6470d101e /unsupported | |
parent | bcbde37a1154ef0da3587709af888af54e8b9720 (diff) |
Made sure the dummy element of size 0 array is always intialized to silence some compiler warnings
Diffstat (limited to 'unsupported')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Core/util/EmulateArray.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/unsupported/Eigen/CXX11/src/Core/util/EmulateArray.h b/unsupported/Eigen/CXX11/src/Core/util/EmulateArray.h index 89aeb03e7..4df0165b9 100644 --- a/unsupported/Eigen/CXX11/src/Core/util/EmulateArray.h +++ b/unsupported/Eigen/CXX11/src/Core/util/EmulateArray.h @@ -165,10 +165,10 @@ template <typename T> class array<T, 0> { static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE std::size_t size() { return 0; } EIGEN_DEVICE_FUNC - EIGEN_STRONG_INLINE array() { } + EIGEN_STRONG_INLINE array() : dummy(static_cast<T>(0)) { } #ifdef EIGEN_HAS_VARIADIC_TEMPLATES - EIGEN_DEVICE_FUNC array(std::initializer_list<T> l) { + EIGEN_DEVICE_FUNC array(std::initializer_list<T> l) : dummy(static_cast<T>(0)) { eigen_assert(l.size() == 0); } #endif |