mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fix g++-6 constexpr and c++20 constexpr build errors.
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
ec9c7163a3
commit
fb212c745d
@@ -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()
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user