diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h b/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h index 5928f0b0c..7a1d40d7d 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h @@ -124,15 +124,15 @@ struct Sizes : internal::numeric_list { } #endif - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t operator[] (const int index) const { - return internal::fixed_size_tensor_index_extraction_helper::run(index, *this); - } - template Sizes& operator = (const T& /*other*/) { // add assertion failure if the size of other is different return *this; } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t operator[] (const int index) const { + return internal::fixed_size_tensor_index_extraction_helper::run(index, *this); + } + template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE size_t IndexOfColMajor(const array& indices) const { return internal::fixed_size_tensor_index_linearization_helper::run(indices, *static_cast(this)); @@ -179,6 +179,11 @@ template & /*indices*/) { // todo: add assertion } + template Sizes& operator = (const T& /*other*/) { + // add assertion failure if the size of other is different + return *this; + } + #ifdef EIGEN_HAS_VARIADIC_TEMPLATES template Sizes(DenseIndex... /*indices*/) { } explicit Sizes(std::initializer_list) { @@ -215,11 +220,6 @@ template Sizes& operator = (const T&) { - // to do: check the size of other - return *this; - } - template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE size_t IndexOfColMajor(const array& indices) const { return internal::fixed_size_tensor_index_linearization_helper::run(indices, *reinterpret_cast(this));