mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-27 07:29:52 +08:00
Fixed a clang compilation warning triggered by the use of arrays of size 0.
This commit is contained in:
parent
4aac55f684
commit
8dd17cbe80
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user