mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-21 07:19:46 +08:00
Made sure the dummy element of size 0 array is always intialized to silence some compiler warnings
This commit is contained in:
parent
bcbde37a11
commit
1cbb79cdfd
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user