aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2015-12-17 14:00:33 -0800
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2015-12-17 14:00:33 -0800
commit8dd17cbe80ef460e9fbd562d6de6ae19b264caea (patch)
tree755a6b66639b06427dd188d4328a1519b7fb6ac7 /unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h
parent4aac55f684d9bd36b5f855fa5a8c2f17ca3094c9 (diff)
Fixed a clang compilation warning triggered by the use of arrays of size 0.
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h')
-rw-r--r--unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h b/unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h
index 785321666..f28a9699d 100644
--- a/unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h
+++ b/unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h
@@ -101,13 +101,18 @@ bool operator!=(const Tuple<U, V>& x, const Tuple<U, V>& y) {
#ifdef EIGEN_HAS_SFINAE
-namespace internal{
+namespace internal {
template<typename IndexType, Index... Is>
EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
array<Index, sizeof...(Is)> customIndices2Array(IndexType& idx, numeric_list<Index, Is...>) {
return { idx[Is]... };
}
+ template<typename IndexType>
+ EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
+ array<Index, 0> customIndices2Array(IndexType&, numeric_list<Index>) {
+ return array<Index, 0>();
+ }
/** Make an array (for index/dimensions) out of a custom index */
template<typename Index, std::size_t NumIndices, typename IndexType>