Cholesky/LDLT.h with g++-10.2 --std=c++2a issue

I came across following issue, which appeared when switched from --std=c++17 (all ok) to --std=c++2a. Tested Eigen-3.3.7 and 3.3.8. Unfortunately part of a big code, cannot easily isolate.

This report is with Eigen-3.3.8:

    In file included from /my/include/eigen3/Eigen/Cholesky:33,
                     from /my/include/eigen3/Eigen/QR:13,
                     from /my/include/eigen3/Eigen/SVD:11,
                     from /my/include/eigen3/Eigen/Geometry:13,
                    ....
    /my/include/eigen3/Eigen/src/Cholesky/LDLT.h: In instantiation of ‘static bool Eigen::internal::ldlt_inplace<1>::unblocked(MatrixType&, TranspositionType&, Workspace&, Eigen::internal::SignMatrix&) [with MatrixType = Eigen::Matrix<double, 6, 6, 0, 6, 6>; TranspositionType = Eigen::Transpositions<6, 6, int>; Workspace = Eigen::Matrix<double, 6, 1, 0, 6, 1>]’:
    /my/include/eigen3/Eigen/src/Cholesky/LDLT.h:520:51:   required from ‘Eigen::LDLT<MatrixType, _UpLo>& Eigen::LDLT<MatrixType, UpLo>::compute(const Eigen::EigenBase<OtherDerived>&) [with InputType = Eigen::Matrix<double, 6, 6, 0, 6, 6>; _MatrixType = Eigen::Matrix<double, 6, 6, 0, 6, 6>; int _UpLo = 1]’
    /my/include/eigen3/Eigen/src/Cholesky/LDLT.h:112:14:   required from ‘Eigen::LDLT<MatrixType, UpLo>::LDLT(const Eigen::EigenBase<OtherDerived>&) [with InputType = Eigen::Matrix<double, 6, 6, 0, 6, 6>; _MatrixType = Eigen::Matrix<double, 6, 6, 0, 6, 6>; int _UpLo = 1]’
    /my/include/eigen3/Eigen/src/Cholesky/LDLT.h:668:10:   required from ‘const Eigen::LDLT<typename Eigen::DenseBase<Derived>::PlainObject> Eigen::MatrixBase<Derived>::ldlt() const [with Derived = Eigen::Matrix<double, 6, 6, 0, 6, 6>; typename Eigen::DenseBase<Derived>::PlainObject = Eigen::Matrix<double, 6, 6, 0, 6, 6>]’
    t1.cpp:49:46:   required from here
    /my/include/eigen3/Eigen/src/Cholesky/LDLT.h:373:58: error: return type of ‘const RCmpEQReturnType Eigen::operator==(const Scalar&, const Eigen::ArrayWrapper<Eigen::Block<Eigen::Block<Eigen::Matrix<double, 6, 6, 0, 6, 6>, 6, 1, true>, -1, 1, false> >&)’ is not ‘bool’
      373 |           ret = ret && (mat.col(j).tail(size-j-1).array()==Scalar(0)).all();
          |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
    /my/include/eigen3/Eigen/src/Cholesky/LDLT.h:373:58: note: used as rewritten candidate for comparison of ‘Eigen::ArrayWrapper<Eigen::Block<Eigen::Block<Eigen::Matrix<double, 6, 6, 0, 6, 6>, 6, 1, true>, -1, 1, false> >’ and ‘Scalar’ {aka ‘double’}
    /my/include/eigen3/Eigen/src/Cholesky/LDLT.h:381:34: error: return type of ‘const RCmpEQReturnType Eigen::operator==(const Scalar&, const Eigen::ArrayWrapper<Eigen::Block<Eigen::Matrix<double, 6, 6, 0, 6, 6>, -1, 1, false> >&)’ is not ‘bool’
      381 |         ret = ret && (A21.array()==Scalar(0)).all();
          |                      ~~~~~~~~~~~~^~~~~~~~~~~~
    /my/include/eigen3/Eigen/src/Cholesky/LDLT.h:381:34: note: used as rewritten candidate for comparison of ‘Eigen::ArrayWrapper<Eigen::Block<Eigen::Matrix<double, 6, 6, 0, 6, 6>, -1, 1, false> >’ and ‘Scalar’ {aka ‘double’}
    In file included from /my/include/eigen3/Eigen/src/Core/ArrayBase.h:96,
                     from /my/include/eigen3/Eigen/Core:453,
                    ....
    /my/include/eigen3/Eigen/src/Core/../plugins/ArrayCwiseBinaryOps.h:193:26: warning: inline function ‘const RCmpEQReturnType Eigen::operator==(const Scalar&, const Eigen::ArrayWrapper<Eigen::Block<Eigen::Matrix<double, 6, 6, 0, 6, 6>, -1, 1, false> >&)’ used but never defined
      193 | EIGEN_MAKE_CWISE_COMP_OP(operator==, EQ)
          |                          ^~~~~~~~
    /my/include/eigen3/Eigen/src/Core/../plugins/ArrayCwiseBinaryOps.h:122:1: note: in definition of macro ‘EIGEN_MAKE_CWISE_COMP_OP’
      122 | OP(const Scalar& s, const Derived& d) { \
          | ^~
    make: *** [all] Error 1
Assignee Loading
Time tracking Loading