Fix g++-6 constexpr and c++20 constexpr build errors.

This commit is contained in:
Antonio Sánchez
2022-09-09 03:41:45 +00:00
committed by Rasmus Munk Larsen
parent ec9c7163a3
commit fb212c745d
4 changed files with 26 additions and 31 deletions

View File

@@ -5,15 +5,12 @@
using namespace Eigen;
inline void error_if_not_constexpr() {} // not constexpr
#if EIGEN_COMP_CXXVER >= 20
consteval
#else
constexpr
#endif
void assert_constexpr(bool b) {
if (!b) error_if_not_constexpr();
}
template<int Blah>
struct AssertConstexpr {};
#define assert_constexpr(expr) \
do { \
(void) AssertConstexpr<(expr, 1)>(); \
} while (false)
constexpr bool zeroSized()
{

View File

@@ -13,7 +13,6 @@
template<typename MatrixType> void inverse_permutation_4x4()
{
typedef typename MatrixType::Scalar Scalar;
Vector4i indices(0,1,2,3);
for(int i = 0; i < 24; ++i)
{