aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/util/Meta.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2019-09-11 15:40:07 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2019-09-11 15:40:07 +0200
commit747c6a51ca36f2cb0d519b83a8a03191b283dfb2 (patch)
tree6c6900464960a6bcbf2ea9e233ff1abd77ed81d5 /Eigen/src/Core/util/Meta.h
parent031f17117d93d38d7078ef02892afdba549a265c (diff)
bug #1736: fix compilation issue with A(all,{1,2}).col(j) by implementing true compile-time "if" for block_evaluator<>::coeff(i)/coeffRef(i)
Diffstat (limited to 'Eigen/src/Core/util/Meta.h')
-rwxr-xr-xEigen/src/Core/util/Meta.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/Eigen/src/Core/util/Meta.h b/Eigen/src/Core/util/Meta.h
index 8fcb18a94..f57739c35 100755
--- a/Eigen/src/Core/util/Meta.h
+++ b/Eigen/src/Core/util/Meta.h
@@ -63,6 +63,15 @@ typedef std::size_t UIntPtr;
struct true_type { enum { value = 1 }; };
struct false_type { enum { value = 0 }; };
+template<bool Condition>
+struct bool_constant;
+
+template<>
+struct bool_constant<true> : true_type {};
+
+template<>
+struct bool_constant<false> : false_type {};
+
template<bool Condition, typename Then, typename Else>
struct conditional { typedef Then type; };