quisp icon indicating copy to clipboard operation
quisp copied to clipboard

Eigen's deprecated warnings

Open zigen opened this issue 2 years ago • 0 comments

Describe the bug we can see lots of deprecated warnings from eigen. we might fix this by updating eigen.

In file included from /home/foobar/src/quisp/eigen/Eigen/Eigen:1:
In file included from /home/foobar/src/quisp/eigen/Eigen/Dense:1:
In file included from /home/foobar/src/quisp/eigen/unsupported/Eigen/../../Eigen/Core:367:
/home/foobar/src/quisp/eigen/Eigen/src/Core/util/Meta.h:320:25: warning: 'result_of<Eigen::internal::scalar_conjugate_op<std::complex<double>> (const std::complex<double> &)>' is deprecated [-Wdeprecated-declarations]
  typedef typename std::result_of<T>::type type1;
                        ^
/home/foobar/src/quisp/eigen/Eigen/src/Core/CwiseUnaryOp.h:21:20: note: in instantiation of template class 'Eigen::internal::result_of<Eigen::internal::scalar_conjugate_op<std::complex<double>> (const std::complex<double> &)>' requested here
  typedef typename result_of<
                   ^
/home/foobar/src/quisp/eigen/Eigen/src/Core/util/XprHelper.h:497:56: note: in instantiation of template class 'Eigen::internal::traits<Eigen::CwiseUnaryOp<Eigen::internal::scalar_conjugate_op<std::complex<double>>, const Eigen::Transpose<const Eigen::Matrix<std::complex<double>, 4, 1, 0>>>>' requested here
template<typename Derived, typename XprKind = typename traits<Derived>::XprKind, typename StorageKind = typename traits<Derived>::StorageKind>
                                                       ^
/home/foobar/src/quisp/eigen/Eigen/src/Core/CwiseUnaryOp.h:95:22: note: in instantiation of default argument for 'generic_xpr_base<Eigen::CwiseUnaryOp<Eigen::internal::scalar_conjugate_op<std::complex<double>>, const Eigen::Transpose<const Eigen::Matrix<std::complex<double>, 4, 1, 0>>>>' required here
  : public internal::generic_xpr_base<CwiseUnaryOp<UnaryOp, XprType> >::type
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/foobar/src/quisp/eigen/Eigen/src/Core/CwiseUnaryOp.h:55:29: note: in instantiation of template class 'Eigen::CwiseUnaryOpImpl<Eigen::internal::scalar_conjugate_op<std::complex<double>>, const Eigen::Transpose<const Eigen::Matrix<std::complex<double>, 4, 1, 0>>, Eigen::Dense>' requested here
class CwiseUnaryOp : public CwiseUnaryOpImpl<UnaryOp, XprType, typename internal::traits<XprType>::StorageKind>, internal::no_assignment_operator
                            ^
modules/QNIC/StationaryQubit/StationaryQubit_test.cc:269:36: note: in instantiation of template class 'Eigen::CwiseUnaryOp<Eigen::internal::scalar_conjugate_op<std::complex<double>>, const Eigen::Transpose<const Eigen::Matrix<std::complex<double>, 4, 1, 0>>>' requested here
  dm = state_vector * state_vector.adjoint();
                                   ^
/usr/local/opt/llvm/bin/../include/c++/v1/type_traits:4009:34: note: 'result_of<Eigen::internal::scalar_conjugate_op<std::complex<double>> (const std::complex<double> &)>' has been explicitly marked deprecated here
template <class _Callable> class _LIBCPP_DEPRECATED_IN_CXX17 result_of;
                                 ^
/usr/local/opt/llvm/bin/../include/c++/v1/__config:1016:39: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
#  define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
                                      ^
/usr/local/opt/llvm/bin/../include/c++/v1/__config:993:48: note: expanded from macro '_LIBCPP_DEPRECATED'
#    define _LIBCPP_DEPRECATED __attribute__ ((deprecated))

To Reproduce Steps to reproduce the behavior:

  1. build quisp

Expected behavior no deprecated warnings.

Desktop (please complete the following information):

  • OS: MacOS
  • QuISP version 23bf4c5
  • OMNeT++ version [if relevant]
  • Eigen version 0fd6b4f
  • Compiler or other build info: Homebrew clang version 13.0.1, Target: x86_64-apple-darwin21.3.0

workaround add CXXFLAGS+=-Wno-deprecated to quisp/makefrag

zigen avatar Mar 09 '22 07:03 zigen