Fixed a clang compilation warning triggered by the use of arrays of size 0.

This commit is contained in:
Benoit Steiner 2015-12-17 14:00:33 -08:00
parent 4aac55f684
commit 8dd17cbe80

View File

@ -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>