diff options
author | Gael Guennebaud <g.gael@free.fr> | 2017-01-19 20:34:18 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2017-01-19 20:34:18 +0100 |
commit | 4d302a080c775290acf23935f233cebbe19540f4 (patch) | |
tree | 1c2512ce2b8f954e2a193bcba851af3077bba55d /Eigen/src/Core/util/IntegralConstant.h | |
parent | 54f3fbee246744d2cb3aeeb9c52ee32a159b29c5 (diff) |
Recover compile-time size from seq(A,B) when A and B are fixed values. (c++11 only)
Diffstat (limited to 'Eigen/src/Core/util/IntegralConstant.h')
-rw-r--r-- | Eigen/src/Core/util/IntegralConstant.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Eigen/src/Core/util/IntegralConstant.h b/Eigen/src/Core/util/IntegralConstant.h index 354aa8c4c..178e4893c 100644 --- a/Eigen/src/Core/util/IntegralConstant.h +++ b/Eigen/src/Core/util/IntegralConstant.h @@ -28,6 +28,10 @@ template<int N> struct fix_t { } fix_t<-N> operator-() const { return fix_t<-N>(); } + template<int M> + fix_t<N+M> operator+(fix_t<M>) const { return fix_t<N+M>(); } + template<int M> + fix_t<N-M> operator-(fix_t<M>) const { return fix_t<N-M>(); } #if EIGEN_HAS_CXX14 // Needed in C++14 to allow fix<N>(): |