mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
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)
This commit is contained in:
@@ -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; };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user