diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-01-31 16:48:50 -0800 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-01-31 16:48:50 -0800 |
commit | 6720b38fbf60d750393af7d63777b06438ba5d81 (patch) | |
tree | 5f24d15dac0eeefb451ae174ad80cac7a7727b15 /unsupported/Eigen/CXX11/src | |
parent | 3f1ee458333ab59218342d595b60536aee760f6a (diff) |
Fixed a few compilation warnings
Diffstat (limited to 'unsupported/Eigen/CXX11/src')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h b/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h index 18a916e46..ed933b6ac 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h @@ -41,7 +41,10 @@ class TensorStorage<T, FixedDimensions, Options_> private: static const std::size_t Size = FixedDimensions::total_size; - EIGEN_ALIGN_MAX T m_data[Size]; + // Allocate an array of size at least one to prevent compiler warnings. + static const std::size_t MinSize = max_n_1<Size>::size; + EIGEN_ALIGN_MAX T m_data[MinSize]; + FixedDimensions m_dimensions; public: |