Skip to content

Compilation failures under LLVM 19 #3106

Closed
@WardBrian

Description

@WardBrian

Description

LLVM 19.1.0 was released last week: https://discourse.llvm.org/t/llvm-19-1-0-released/81285

Running our test pipeline uncovered some failures: https://jenkins.flatironinstitute.org/blue/organizations/jenkins/Stan%2FBleedingEdgeCompilersMonthly/detail/BleedingEdgeCompilersMonthly/198/pipeline/207

Example

Details

In file included from test/unit/math/mix/fun_16_test.cpp:1:

In file included from ./test/unit/math/test_ad.hpp:4:

In file included from ./stan/math/mix.hpp:4:

In file included from ./stan/math/mix/meta.hpp:6:

In file included from ./stan/math/fwd/core.hpp:4:

In file included from ./stan/math/fwd/core/fvar.hpp:4:

In file included from ./stan/math/prim/meta.hpp:72:

In file included from ./stan/math/prim/meta/append_return_type.hpp:4:

In file included from ./stan/math/prim/fun/Eigen.hpp:22:

In file included from lib/eigen_3.4.0/Eigen/Dense:1:

In file included from lib/eigen_3.4.0/Eigen/Core:19:

In file included from lib/eigen_3.4.0/Eigen/src/Core/util/Macros.h:679:

In file included from /usr/local/include/c++/v1/cmath:316:

In file included from /usr/local/include/c++/v1/__math/hypot.h:15:

In file included from /usr/local/include/c++/v1/__math/exponential_functions.h:17:

/usr/local/include/c++/v1/__type_traits/promote.h:32:18: error: static assertion failed due to requirement 'is_arithmetic<stan::math::var_value<double, void>>::value'

   32 |   static_assert((is_arithmetic<_Args>::value && ...));

      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~

/usr/local/include/c++/v1/complex:1116:47: note: in instantiation of template class 'std::__promote<int, stan::math::var_value<double>>' requested here

 1116 | inline _LIBCPP_HIDE_FROM_ABI complex<typename __promote<_Tp, _Up>::type> pow(const _Tp& __x, const complex<_Up>& __y) {

      |                                               ^

test/unit/math/mix/fun_16_test.cpp:275:13: note: while substituting deduced template arguments into function template 'pow' [with _Tp = int, _Up = stan::math::var_value<double>, $2 = (no value)]

  275 |   auto a5 = pow(i, cv);

      |             ^

In file included from test/unit/math/mix/fun_16_test.cpp:1:

In file included from ./test/unit/math/test_ad.hpp:4:

In file included from ./stan/math/mix.hpp:4:

In file included from ./stan/math/mix/meta.hpp:6:

In file included from ./stan/math/fwd/core.hpp:4:

In file included from ./stan/math/fwd/core/fvar.hpp:4:

In file included from ./stan/math/prim/meta.hpp:72:

In file included from ./stan/math/prim/meta/append_return_type.hpp:4:

In file included from ./stan/math/prim/fun/Eigen.hpp:22:

In file included from lib/eigen_3.4.0/Eigen/Dense:1:

In file included from lib/eigen_3.4.0/Eigen/Core:19:

In file included from lib/eigen_3.4.0/Eigen/src/Core/util/Macros.h:679:

In file included from /usr/local/include/c++/v1/cmath:316:

In file included from /usr/local/include/c++/v1/__math/hypot.h:15:

In file included from /usr/local/include/c++/v1/__math/exponential_functions.h:17:

/usr/local/include/c++/v1/__type_traits/promote.h:32:18: error: static assertion failed due to requirement 'is_arithmetic<stan::math::var_value<double, void>>::value'

   32 |   static_assert((is_arithmetic<_Args>::value && ...));

      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~

/usr/local/include/c++/v1/complex:1116:47: note: in instantiation of template class 'std::__promote<double, stan::math::var_value<double>>' requested here

 1116 | inline _LIBCPP_HIDE_FROM_ABI complex<typename __promote<_Tp, _Up>::type> pow(const _Tp& __x, const complex<_Up>& __y) {

      |                                               ^

test/unit/math/mix/fun_16_test.cpp:281:13: note: while substituting deduced template arguments into function template 'pow' [with _Tp = double, _Up = stan::math::var_value<double>, $2 = (no value)]

  281 |   auto b5 = pow(d, cv);

      |             ^

In file included from test/unit/math/mix/fun_16_test.cpp:1:

In file included from ./test/unit/math/test_ad.hpp:4:

In file included from ./stan/math/mix.hpp:4:

In file included from ./stan/math/mix/meta.hpp:6:

In file included from ./stan/math/fwd/core.hpp:4:

In file included from ./stan/math/fwd/core/fvar.hpp:4:

In file included from ./stan/math/prim/meta.hpp:72:

In file included from ./stan/math/prim/meta/append_return_type.hpp:4:

In file included from ./stan/math/prim/fun/Eigen.hpp:22:

In file included from lib/eigen_3.4.0/Eigen/Dense:1:

In file included from lib/eigen_3.4.0/Eigen/Core:19:

In file included from lib/eigen_3.4.0/Eigen/src/Core/util/Macros.h:679:

In file included from /usr/local/include/c++/v1/cmath:316:

In file included from /usr/local/include/c++/v1/__math/hypot.h:15:

In file included from /usr/local/include/c++/v1/__math/exponential_functions.h:17:

/usr/local/include/c++/v1/__type_traits/promote.h:32:18: error: static assertion failed due to requirement 'is_arithmetic<stan::math::var_value<double, void>>::value'

   32 |   static_assert((is_arithmetic<_Args>::value && ...));

      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~

/usr/local/include/c++/v1/complex:1110:47: note: in instantiation of template class 'std::__promote<stan::math::var_value<double>, int>' requested here

 1110 | inline _LIBCPP_HIDE_FROM_ABI complex<typename __promote<_Tp, _Up>::type> pow(const complex<_Tp>& __x, const _Up& __y) {

      |                                               ^

test/unit/math/mix/fun_16_test.cpp:295:13: note: while substituting deduced template arguments into function template 'pow' [with _Tp = stan::math::var_value<double>, _Up = int, $2 = (no value)]

  295 |   auto d1 = pow(cv, i);

      |             ^

In file included from test/unit/math/mix/fun_16_test.cpp:1:

In file included from ./test/unit/math/test_ad.hpp:4:

In file included from ./stan/math/mix.hpp:4:

In file included from ./stan/math/mix/meta.hpp:6:

In file included from ./stan/math/fwd/core.hpp:4:

In file included from ./stan/math/fwd/core/fvar.hpp:4:

In file included from ./stan/math/prim/meta.hpp:72:

In file included from ./stan/math/prim/meta/append_return_type.hpp:4:

In file included from ./stan/math/prim/fun/Eigen.hpp:22:

In file included from lib/eigen_3.4.0/Eigen/Dense:1:

In file included from lib/eigen_3.4.0/Eigen/Core:19:

In file included from lib/eigen_3.4.0/Eigen/src/Core/util/Macros.h:679:

In file included from /usr/local/include/c++/v1/cmath:316:

In file included from /usr/local/include/c++/v1/__math/hypot.h:15:

In file included from /usr/local/include/c++/v1/__math/exponential_functions.h:17:

/usr/local/include/c++/v1/__type_traits/promote.h:32:18: error: static assertion failed due to requirement 'is_arithmetic<stan::math::var_value<double, void>>::value'

   32 |   static_assert((is_arithmetic<_Args>::value && ...));

      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~

/usr/local/include/c++/v1/complex:1110:47: note: in instantiation of template class 'std::__promote<stan::math::var_value<double>, double>' requested here

 1110 | inline _LIBCPP_HIDE_FROM_ABI complex<typename __promote<_Tp, _Up>::type> pow(const complex<_Tp>& __x, const _Up& __y) {

      |                                               ^

test/unit/math/mix/fun_16_test.cpp:296:13: note: while substituting deduced template arguments into function template 'pow' [with _Tp = stan::math::var_value<double>, _Up = double, $2 = (no value)]

  296 |   auto d2 = pow(cv, d);

      |             ^

In file included from test/unit/math/mix/fun_16_test.cpp:1:

In file included from ./test/unit/math/test_ad.hpp:4:

In file included from ./stan/math/mix.hpp:4:

In file included from ./stan/math/mix/meta.hpp:6:

In file included from ./stan/math/fwd/core.hpp:4:

In file included from ./stan/math/fwd/core/fvar.hpp:4:

In file included from ./stan/math/prim/meta.hpp:72:

In file included from ./stan/math/prim/meta/append_return_type.hpp:4:

In file included from ./stan/math/prim/fun/Eigen.hpp:22:

In file included from lib/eigen_3.4.0/Eigen/Dense:1:

In file included from lib/eigen_3.4.0/Eigen/Core:19:

In file included from lib/eigen_3.4.0/Eigen/src/Core/util/Macros.h:679:

In file included from /usr/local/include/c++/v1/cmath:316:

In file included from /usr/local/include/c++/v1/__math/hypot.h:15:

In file included from /usr/local/include/c++/v1/__math/exponential_functions.h:17:

/usr/local/include/c++/v1/__type_traits/promote.h:32:18: error: static assertion failed due to requirement 'is_arithmetic<stan::math::var_value<double, void>>::value'

   32 |   static_assert((is_arithmetic<_Args>::value && ...));

      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~

/usr/local/include/c++/v1/complex:1103:47: note: in instantiation of template class 'std::__promote<stan::math::var_value<double>, stan::math::var_value<double>>' requested here

 1103 | inline _LIBCPP_HIDE_FROM_ABI complex<typename __promote<_Tp, _Up>::type>

      |                                               ^

test/unit/math/mix/fun_16_test.cpp:299:13: note: while substituting deduced template arguments into function template 'pow' [with _Tp = stan::math::var_value<double>, _Up = stan::math::var_value<double>]

  299 |   auto d5 = pow(cv, cv);

      |             ^

In file included from test/unit/math/mix/fun_16_test.cpp:1:

In file included from ./test/unit/math/test_ad.hpp:4:

In file included from ./stan/math/mix.hpp:4:

In file included from ./stan/math/mix/meta.hpp:6:

In file included from ./stan/math/fwd/core.hpp:4:

In file included from ./stan/math/fwd/core/fvar.hpp:4:

In file included from ./stan/math/prim/meta.hpp:72:

In file included from ./stan/math/prim/meta/append_return_type.hpp:4:

In file included from ./stan/math/prim/fun/Eigen.hpp:22:

In file included from lib/eigen_3.4.0/Eigen/Dense:1:

In file included from lib/eigen_3.4.0/Eigen/Core:19:

In file included from lib/eigen_3.4.0/Eigen/src/Core/util/Macros.h:679:

In file included from /usr/local/include/c++/v1/cmath:316:

In file included from /usr/local/include/c++/v1/__math/hypot.h:15:

In file included from /usr/local/include/c++/v1/__math/exponential_functions.h:17:

/usr/local/include/c++/v1/__type_traits/promote.h:32:18: error: static assertion failed due to requirement 'is_arithmetic<stan::math::fvar<double>>::value'

   32 |   static_assert((is_arithmetic<_Args>::value && ...));

      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~

/usr/local/include/c++/v1/complex:1116:47: note: in instantiation of template class 'std::__promote<int, stan::math::fvar<double>>' requested here

 1116 | inline _LIBCPP_HIDE_FROM_ABI complex<typename __promote<_Tp, _Up>::type> pow(const _Tp& __x, const complex<_Up>& __y) {

      |                                               ^

test/unit/math/mix/fun_16_test.cpp:321:13: note: while substituting deduced template arguments into function template 'pow' [with _Tp = int, _Up = stan::math::fvar<double>, $2 = (no value)]

  321 |   auto a5 = pow(i, cv);

      |             ^

In file included from test/unit/math/mix/fun_16_test.cpp:1:

In file included from ./test/unit/math/test_ad.hpp:4:

In file included from ./stan/math/mix.hpp:4:

In file included from ./stan/math/mix/meta.hpp:6:

In file included from ./stan/math/fwd/core.hpp:4:

In file included from ./stan/math/fwd/core/fvar.hpp:4:

In file included from ./stan/math/prim/meta.hpp:72:

In file included from ./stan/math/prim/meta/append_return_type.hpp:4:

In file included from ./stan/math/prim/fun/Eigen.hpp:22:

In file included from lib/eigen_3.4.0/Eigen/Dense:1:

In file included from lib/eigen_3.4.0/Eigen/Core:19:

In file included from lib/eigen_3.4.0/Eigen/src/Core/util/Macros.h:679:

In file included from /usr/local/include/c++/v1/cmath:316:

In file included from /usr/local/include/c++/v1/__math/hypot.h:15:

In file included from /usr/local/include/c++/v1/__math/exponential_functions.h:17:

/usr/local/include/c++/v1/__type_traits/promote.h:32:18: error: static assertion failed due to requirement 'is_arithmetic<stan::math::fvar<double>>::value'

   32 |   static_assert((is_arithmetic<_Args>::value && ...));

      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~

/usr/local/include/c++/v1/complex:1116:47: note: in instantiation of template class 'std::__promote<double, stan::math::fvar<double>>' requested here

 1116 | inline _LIBCPP_HIDE_FROM_ABI complex<typename __promote<_Tp, _Up>::type> pow(const _Tp& __x, const complex<_Up>& __y) {

      |                                               ^

test/unit/math/mix/fun_16_test.cpp:327:13: note: while substituting deduced template arguments into function template 'pow' [with _Tp = double, _Up = stan::math::fvar<double>, $2 = (no value)]

  327 |   auto b5 = pow(d, cv);

      |             ^

In file included from test/unit/math/mix/fun_16_test.cpp:1:

In file included from ./test/unit/math/test_ad.hpp:4:

In file included from ./stan/math/mix.hpp:4:

In file included from ./stan/math/mix/meta.hpp:6:

In file included from ./stan/math/fwd/core.hpp:4:

In file included from ./stan/math/fwd/core/fvar.hpp:4:

In file included from ./stan/math/prim/meta.hpp:72:

In file included from ./stan/math/prim/meta/append_return_type.hpp:4:

In file included from ./stan/math/prim/fun/Eigen.hpp:22:

In file included from lib/eigen_3.4.0/Eigen/Dense:1:

In file included from lib/eigen_3.4.0/Eigen/Core:19:

In file included from lib/eigen_3.4.0/Eigen/src/Core/util/Macros.h:679:

In file included from /usr/local/include/c++/v1/cmath:316:

In file included from /usr/local/include/c++/v1/__math/hypot.h:15:

In file included from /usr/local/include/c++/v1/__math/exponential_functions.h:17:

/usr/local/include/c++/v1/__type_traits/promote.h:32:18: error: static assertion failed due to requirement 'is_arithmetic<stan::math::fvar<double>>::value'

   32 |   static_assert((is_arithmetic<_Args>::value && ...));

      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~

/usr/local/include/c++/v1/complex:1110:47: note: in instantiation of template class 'std::__promote<stan::math::fvar<double>, int>' requested here

 1110 | inline _LIBCPP_HIDE_FROM_ABI complex<typename __promote<_Tp, _Up>::type> pow(const complex<_Tp>& __x, const _Up& __y) {

      |                                               ^

test/unit/math/mix/fun_16_test.cpp:335:13: note: while substituting deduced template arguments into function template 'pow' [with _Tp = stan::math::fvar<double>, _Up = int, $2 = (no value)]

  335 |   auto d1 = pow(cv, i);

      |             ^

In file included from test/unit/math/mix/fun_16_test.cpp:1:

In file included from ./test/unit/math/test_ad.hpp:4:

In file included from ./stan/math/mix.hpp:4:

In file included from ./stan/math/mix/meta.hpp:6:

In file included from ./stan/math/fwd/core.hpp:4:

In file included from ./stan/math/fwd/core/fvar.hpp:4:

In file included from ./stan/math/prim/meta.hpp:72:

In file included from ./stan/math/prim/meta/append_return_type.hpp:4:

In file included from ./stan/math/prim/fun/Eigen.hpp:22:

In file included from lib/eigen_3.4.0/Eigen/Dense:1:

In file included from lib/eigen_3.4.0/Eigen/Core:19:

In file included from lib/eigen_3.4.0/Eigen/src/Core/util/Macros.h:679:

In file included from /usr/local/include/c++/v1/cmath:316:

In file included from /usr/local/include/c++/v1/__math/hypot.h:15:

In file included from /usr/local/include/c++/v1/__math/exponential_functions.h:17:

/usr/local/include/c++/v1/__type_traits/promote.h:32:18: error: static assertion failed due to requirement 'is_arithmetic<stan::math::fvar<double>>::value'

   32 |   static_assert((is_arithmetic<_Args>::value && ...));

      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~

/usr/local/include/c++/v1/complex:1110:47: note: in instantiation of template class 'std::__promote<stan::math::fvar<double>, double>' requested here

 1110 | inline _LIBCPP_HIDE_FROM_ABI complex<typename __promote<_Tp, _Up>::type> pow(const complex<_Tp>& __x, const _Up& __y) {

      |                                               ^

test/unit/math/mix/fun_16_test.cpp:336:13: note: while substituting deduced template arguments into function template 'pow' [with _Tp = stan::math::fvar<double>, _Up = double, $2 = (no value)]

  336 |   auto d2 = pow(cv, d);

      |             ^

In file included from test/unit/math/mix/fun_16_test.cpp:1:

In file included from ./test/unit/math/test_ad.hpp:4:

In file included from ./stan/math/mix.hpp:4:

In file included from ./stan/math/mix/meta.hpp:6:

In file included from ./stan/math/fwd/core.hpp:4:

In file included from ./stan/math/fwd/core/fvar.hpp:4:

In file included from ./stan/math/prim/meta.hpp:72:

In file included from ./stan/math/prim/meta/append_return_type.hpp:4:

In file included from ./stan/math/prim/fun/Eigen.hpp:22:

In file included from lib/eigen_3.4.0/Eigen/Dense:1:

In file included from lib/eigen_3.4.0/Eigen/Core:19:

In file included from lib/eigen_3.4.0/Eigen/src/Core/util/Macros.h:679:

In file included from /usr/local/include/c++/v1/cmath:316:

In file included from /usr/local/include/c++/v1/__math/hypot.h:15:

In file included from /usr/local/include/c++/v1/__math/exponential_functions.h:17:

/usr/local/include/c++/v1/__type_traits/promote.h:32:18: error: static assertion failed due to requirement 'is_arithmetic<stan::math::fvar<double>>::value'

   32 |   static_assert((is_arithmetic<_Args>::value && ...));

      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~

/usr/local/include/c++/v1/complex:1103:47: note: in instantiation of template class 'std::__promote<stan::math::fvar<double>, stan::math::fvar<double>>' requested here

 1103 | inline _LIBCPP_HIDE_FROM_ABI complex<typename __promote<_Tp, _Up>::type>

      |                                               ^

test/unit/math/mix/fun_16_test.cpp:339:13: note: while substituting deduced template arguments into function template 'pow' [with _Tp = stan::math::fvar<double>, _Up = stan::math::fvar<double>]

  339 |   auto d5 = pow(cv, cv);

      |             ^

In file included from test/unit/math/mix/fun_16_test.cpp:1:

In file included from ./test/unit/math/test_ad.hpp:4:

In file included from ./stan/math/mix.hpp:4:

In file included from ./stan/math/mix/meta.hpp:6:

In file included from ./stan/math/fwd/core.hpp:4:

In file included from ./stan/math/fwd/core/fvar.hpp:4:

In file included from ./stan/math/prim/meta.hpp:72:

In file included from ./stan/math/prim/meta/append_return_type.hpp:4:

In file included from ./stan/math/prim/fun/Eigen.hpp:22:

In file included from lib/eigen_3.4.0/Eigen/Dense:1:

In file included from lib/eigen_3.4.0/Eigen/Core:19:

In file included from lib/eigen_3.4.0/Eigen/src/Core/util/Macros.h:679:

In file included from /usr/local/include/c++/v1/cmath:316:

In file included from /usr/local/include/c++/v1/__math/hypot.h:15:

In file included from /usr/local/include/c++/v1/__math/exponential_functions.h:17:

/usr/local/include/c++/v1/__type_traits/promote.h:32:18: error: static assertion failed due to requirement 'is_arithmetic<stan::math::fvar<stan::math::fvar<double>>>::value'

   32 |   static_assert((is_arithmetic<_Args>::value && ...));

      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~

/usr/local/include/c++/v1/complex:1110:47: note: in instantiation of template class 'std::__promote<stan::math::fvar<stan::math::fvar<double>>, int>' requested here

 1110 | inline _LIBCPP_HIDE_FROM_ABI complex<typename __promote<_Tp, _Up>::type> pow(const complex<_Tp>& __x, const _Up& __y) {

      |                                               ^

test/unit/math/mix/fun_16_test.cpp:163:13: note: while substituting deduced template arguments into function template 'pow' [with _Tp = stan::math::fvar<stan::math::fvar<double>>, _Up = int, $2 = (no value)]

  163 |   auto a2 = pow(std::complex<T>(1.0), 1);

      |             ^

test/unit/math/mix/fun_16_test.cpp:179:3: note: in instantiation of function template specialization 'expect_arith_instantiate<stan::math::fvar<stan::math::fvar<double>>>' requested here

  179 |   expect_arith_instantiate<fvar<fvar<double>>>();

      |   ^

In file included from test/unit/math/mix/fun_16_test.cpp:1:

In file included from ./test/unit/math/test_ad.hpp:4:

In file included from ./stan/math/mix.hpp:4:

In file included from ./stan/math/mix/meta.hpp:6:

In file included from ./stan/math/fwd/core.hpp:4:

In file included from ./stan/math/fwd/core/fvar.hpp:4:

In file included from ./stan/math/prim/meta.hpp:72:

In file included from ./stan/math/prim/meta/append_return_type.hpp:4:

In file included from ./stan/math/prim/fun/Eigen.hpp:22:

In file included from lib/eigen_3.4.0/Eigen/Dense:1:

In file included from lib/eigen_3.4.0/Eigen/Core:19:

In file included from lib/eigen_3.4.0/Eigen/src/Core/util/Macros.h:679:

In file included from /usr/local/include/c++/v1/cmath:316:

In file included from /usr/local/include/c++/v1/__math/hypot.h:15:

In file included from /usr/local/include/c++/v1/__math/exponential_functions.h:17:

/usr/local/include/c++/v1/__type_traits/promote.h:32:18: error: static assertion failed due to requirement 'is_arithmetic<stan::math::fvar<stan::math::fvar<double>>>::value'

   32 |   static_assert((is_arithmetic<_Args>::value && ...));

      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~

/usr/local/include/c++/v1/complex:1110:47: note: in instantiation of template class 'std::__promote<stan::math::fvar<stan::math::fvar<double>>, double>' requested here

 1110 | inline _LIBCPP_HIDE_FROM_ABI complex<typename __promote<_Tp, _Up>::type> pow(const complex<_Tp>& __x, const _Up& __y) {

      |                                               ^

test/unit/math/mix/fun_16_test.cpp:164:13: note: while substituting deduced template arguments into function template 'pow' [with _Tp = stan::math::fvar<stan::math::fvar<double>>, _Up = double, $2 = (no value)]

  164 |   auto b2 = pow(std::complex<T>(1.0), 1.0);

      |             ^

test/unit/math/mix/fun_16_test.cpp:179:3: note: in instantiation of function template specialization 'expect_arith_instantiate<stan::math::fvar<stan::math::fvar<double>>>' requested here

  179 |   expect_arith_instantiate<fvar<fvar<double>>>();

      |   ^

In file included from test/unit/math/mix/fun_16_test.cpp:1:

In file included from ./test/unit/math/test_ad.hpp:4:

In file included from ./stan/math/mix.hpp:4:

In file included from ./stan/math/mix/meta.hpp:6:

In file included from ./stan/math/fwd/core.hpp:4:

In file included from ./stan/math/fwd/core/fvar.hpp:4:

In file included from ./stan/math/prim/meta.hpp:72:

In file included from ./stan/math/prim/meta/append_return_type.hpp:4:

In file included from ./stan/math/prim/fun/Eigen.hpp:22:

In file included from lib/eigen_3.4.0/Eigen/Dense:1:

In file included from lib/eigen_3.4.0/Eigen/Core:19:

In file included from lib/eigen_3.4.0/Eigen/src/Core/util/Macros.h:679:

In file included from /usr/local/include/c++/v1/cmath:316:

In file included from /usr/local/include/c++/v1/__math/hypot.h:15:

In file included from /usr/local/include/c++/v1/__math/exponential_functions.h:17:

/usr/local/include/c++/v1/__type_traits/promote.h:32:18: error: static assertion failed due to requirement 'is_arithmetic<stan::math::fvar<stan::math::fvar<double>>>::value'

   32 |   static_assert((is_arithmetic<_Args>::value && ...));

      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~

/usr/local/include/c++/v1/complex:1116:47: note: in instantiation of template class 'std::__promote<int, stan::math::fvar<stan::math::fvar<double>>>' requested here

 1116 | inline _LIBCPP_HIDE_FROM_ABI complex<typename __promote<_Tp, _Up>::type> pow(const _Tp& __x, const complex<_Up>& __y) {

      |                                               ^

test/unit/math/mix/fun_16_test.cpp:165:13: note: while substituting deduced template arguments into function template 'pow' [with _Tp = int, _Up = stan::math::fvar<stan::math::fvar<double>>, $2 = (no value)]

  165 |   auto c2 = pow(1, std::complex<T>(1.0));

      |             ^

test/unit/math/mix/fun_16_test.cpp:179:3: note: in instantiation of function template specialization 'expect_arith_instantiate<stan::math::fvar<stan::math::fvar<double>>>' requested here

  179 |   expect_arith_instantiate<fvar<fvar<double>>>();

      |   ^

In file included from test/unit/math/mix/fun_16_test.cpp:1:

In file included from ./test/unit/math/test_ad.hpp:4:

In file included from ./stan/math/mix.hpp:4:

In file included from ./stan/math/mix/meta.hpp:6:

In file included from ./stan/math/fwd/core.hpp:4:

In file included from ./stan/math/fwd/core/fvar.hpp:4:

In file included from ./stan/math/prim/meta.hpp:72:

In file included from ./stan/math/prim/meta/append_return_type.hpp:4:

In file included from ./stan/math/prim/fun/Eigen.hpp:22:

In file included from lib/eigen_3.4.0/Eigen/Dense:1:

In file included from lib/eigen_3.4.0/Eigen/Core:19:

In file included from lib/eigen_3.4.0/Eigen/src/Core/util/Macros.h:679:

In file included from /usr/local/include/c++/v1/cmath:316:

In file included from /usr/local/include/c++/v1/__math/hypot.h:15:

In file included from /usr/local/include/c++/v1/__math/exponential_functions.h:17:

/usr/local/include/c++/v1/__type_traits/promote.h:32:18: error: static assertion failed due to requirement 'is_arithmetic<stan::math::fvar<stan::math::fvar<double>>>::value'

   32 |   static_assert((is_arithmetic<_Args>::value && ...));

      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~

/usr/local/include/c++/v1/complex:1116:47: note: in instantiation of template class 'std::__promote<double, stan::math::fvar<stan::math::fvar<double>>>' requested here

 1116 | inline _LIBCPP_HIDE_FROM_ABI complex<typename __promote<_Tp, _Up>::type> pow(const _Tp& __x, const complex<_Up>& __y) {

      |                                               ^

test/unit/math/mix/fun_16_test.cpp:166:13: note: while substituting deduced template arguments into function template 'pow' [with _Tp = double, _Up = stan::math::fvar<stan::math::fvar<double>>, $2 = (no value)]

  166 |   auto d2 = pow(1.0, std::complex<T>(1.0));

      |             ^

test/unit/math/mix/fun_16_test.cpp:179:3: note: in instantiation of function template specialization 'expect_arith_instantiate<stan::math::fvar<stan::math::fvar<double>>>' requested here

  179 |   expect_arith_instantiate<fvar<fvar<double>>>();

      |   ^

In file included from test/unit/math/mix/fun_16_test.cpp:1:

In file included from ./test/unit/math/test_ad.hpp:4:

In file included from ./stan/math/mix.hpp:4:

In file included from ./stan/math/mix/meta.hpp:6:

In file included from ./stan/math/fwd/core.hpp:4:

In file included from ./stan/math/fwd/core/fvar.hpp:4:

In file included from ./stan/math/prim/meta.hpp:72:

In file included from ./stan/math/prim/meta/append_return_type.hpp:4:

In file included from ./stan/math/prim/fun/Eigen.hpp:22:

In file included from lib/eigen_3.4.0/Eigen/Dense:1:

In file included from lib/eigen_3.4.0/Eigen/Core:19:

In file included from lib/eigen_3.4.0/Eigen/src/Core/util/Macros.h:679:

In file included from /usr/local/include/c++/v1/cmath:316:

In file included from /usr/local/include/c++/v1/__math/hypot.h:15:

In file included from /usr/local/include/c++/v1/__math/exponential_functions.h:17:

/usr/local/include/c++/v1/__type_traits/promote.h:32:18: error: static assertion failed due to requirement 'is_arithmetic<stan::math::fvar<stan::math::fvar<double>>>::value'

   32 |   static_assert((is_arithmetic<_Args>::value && ...));

      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~

/usr/local/include/c++/v1/complex:1103:47: note: in instantiation of template class 'std::__promote<stan::math::fvar<stan::math::fvar<double>>, stan::math::fvar<stan::math::fvar<double>>>' requested here

 1103 | inline _LIBCPP_HIDE_FROM_ABI complex<typename __promote<_Tp, _Up>::type>

      |                                               ^

test/unit/math/mix/fun_16_test.cpp:167:13: note: while substituting deduced template arguments into function template 'pow' [with _Tp = stan::math::fvar<stan::math::fvar<double>>, _Up = stan::math::fvar<stan::math::fvar<double>>]

  167 |   auto e2 = pow(std::complex<T>(1.0), std::complex<T>(1.0));

      |             ^

test/unit/math/mix/fun_16_test.cpp:179:3: note: in instantiation of function template specialization 'expect_arith_instantiate<stan::math::fvar<stan::math::fvar<double>>>' requested here

  179 |   expect_arith_instantiate<fvar<fvar<double>>>();

      |   ^

In file included from test/unit/math/mix/fun_16_test.cpp:1:

In file included from ./test/unit/math/test_ad.hpp:4:

In file included from ./stan/math/mix.hpp:4:

In file included from ./stan/math/mix/meta.hpp:6:

In file included from ./stan/math/fwd/core.hpp:4:

In file included from ./stan/math/fwd/core/fvar.hpp:4:

In file included from ./stan/math/prim/meta.hpp:72:

In file included from ./stan/math/prim/meta/append_return_type.hpp:4:

In file included from ./stan/math/prim/fun/Eigen.hpp:22:

In file included from lib/eigen_3.4.0/Eigen/Dense:1:

In file included from lib/eigen_3.4.0/Eigen/Core:19:

In file included from lib/eigen_3.4.0/Eigen/src/Core/util/Macros.h:679:

In file included from /usr/local/include/c++/v1/cmath:316:

In file included from /usr/local/include/c++/v1/__math/hypot.h:15:

In file included from /usr/local/include/c++/v1/__math/exponential_functions.h:17:

/usr/local/include/c++/v1/__type_traits/promote.h:32:18: error: static assertion failed due to requirement 'is_arithmetic<stan::math::fvar<stan::math::var_value<double, void>>>::value'

   32 |   static_assert((is_arithmetic<_Args>::value && ...));

      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~

/usr/local/include/c++/v1/complex:1110:47: note: in instantiation of template class 'std::__promote<stan::math::fvar<stan::math::var_value<double>>, int>' requested here

 1110 | inline _LIBCPP_HIDE_FROM_ABI complex<typename __promote<_Tp, _Up>::type> pow(const complex<_Tp>& __x, const _Up& __y) {

      |                                               ^

test/unit/math/mix/fun_16_test.cpp:163:13: note: while substituting deduced template arguments into function template 'pow' [with _Tp = stan::math::fvar<stan::math::var_value<double>>, _Up = int, $2 = (no value)]

  163 |   auto a2 = pow(std::complex<T>(1.0), 1);

      |             ^

test/unit/math/mix/fun_16_test.cpp:180:3: note: in instantiation of function template specialization 'expect_arith_instantiate<stan::math::fvar<stan::math::var_value<double>>>' requested here

  180 |   expect_arith_instantiate<fvar<var>>();

      |   ^

In file included from test/unit/math/mix/fun_16_test.cpp:1:

In file included from ./test/unit/math/test_ad.hpp:4:

In file included from ./stan/math/mix.hpp:4:

In file included from ./stan/math/mix/meta.hpp:6:

In file included from ./stan/math/fwd/core.hpp:4:

In file included from ./stan/math/fwd/core/fvar.hpp:4:

In file included from ./stan/math/prim/meta.hpp:72:

In file included from ./stan/math/prim/meta/append_return_type.hpp:4:

In file included from ./stan/math/prim/fun/Eigen.hpp:22:

In file included from lib/eigen_3.4.0/Eigen/Dense:1:

In file included from lib/eigen_3.4.0/Eigen/Core:19:

In file included from lib/eigen_3.4.0/Eigen/src/Core/util/Macros.h:679:

In file included from /usr/local/include/c++/v1/cmath:316:

In file included from /usr/local/include/c++/v1/__math/hypot.h:15:

In file included from /usr/local/include/c++/v1/__math/exponential_functions.h:17:

/usr/local/include/c++/v1/__type_traits/promote.h:32:18: error: static assertion failed due to requirement 'is_arithmetic<stan::math::fvar<stan::math::var_value<double, void>>>::value'

   32 |   static_assert((is_arithmetic<_Args>::value && ...));

      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~

/usr/local/include/c++/v1/complex:1110:47: note: in instantiation of template class 'std::__promote<stan::math::fvar<stan::math::var_value<double>>, double>' requested here

 1110 | inline _LIBCPP_HIDE_FROM_ABI complex<typename __promote<_Tp, _Up>::type> pow(const complex<_Tp>& __x, const _Up& __y) {

      |                                               ^

test/unit/math/mix/fun_16_test.cpp:164:13: note: while substituting deduced template arguments into function template 'pow' [with _Tp = stan::math::fvar<stan::math::var_value<double>>, _Up = double, $2 = (no value)]

  164 |   auto b2 = pow(std::complex<T>(1.0), 1.0);

      |             ^

test/unit/math/mix/fun_16_test.cpp:180:3: note: in instantiation of function template specialization 'expect_arith_instantiate<stan::math::fvar<stan::math::var_value<double>>>' requested here

  180 |   expect_arith_instantiate<fvar<var>>();

      |   ^

In file included from test/unit/math/mix/fun_16_test.cpp:1:

In file included from ./test/unit/math/test_ad.hpp:4:

In file included from ./stan/math/mix.hpp:4:

In file included from ./stan/math/mix/meta.hpp:6:

In file included from ./stan/math/fwd/core.hpp:4:

In file included from ./stan/math/fwd/core/fvar.hpp:4:

In file included from ./stan/math/prim/meta.hpp:72:

In file included from ./stan/math/prim/meta/append_return_type.hpp:4:

In file included from ./stan/math/prim/fun/Eigen.hpp:22:

In file included from lib/eigen_3.4.0/Eigen/Dense:1:

In file included from lib/eigen_3.4.0/Eigen/Core:19:

In file included from lib/eigen_3.4.0/Eigen/src/Core/util/Macros.h:679:

In file included from /usr/local/include/c++/v1/cmath:316:

In file included from /usr/local/include/c++/v1/__math/hypot.h:15:

In file included from /usr/local/include/c++/v1/__math/exponential_functions.h:17:

/usr/local/include/c++/v1/__type_traits/promote.h:32:18: error: static assertion failed due to requirement 'is_arithmetic<stan::math::fvar<stan::math::var_value<double, void>>>::value'

   32 |   static_assert((is_arithmetic<_Args>::value && ...));

      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~

/usr/local/include/c++/v1/complex:1116:47: note: in instantiation of template class 'std::__promote<int, stan::math::fvar<stan::math::var_value<double>>>' requested here

 1116 | inline _LIBCPP_HIDE_FROM_ABI complex<typename __promote<_Tp, _Up>::type> pow(const _Tp& __x, const complex<_Up>& __y) {

      |                                               ^

test/unit/math/mix/fun_16_test.cpp:165:13: note: while substituting deduced template arguments into function template 'pow' [with _Tp = int, _Up = stan::math::fvar<stan::math::var_value<double>>, $2 = (no value)]

  165 |   auto c2 = pow(1, std::complex<T>(1.0));

      |             ^

test/unit/math/mix/fun_16_test.cpp:180:3: note: in instantiation of function template specialization 'expect_arith_instantiate<stan::math::fvar<stan::math::var_value<double>>>' requested here

  180 |   expect_arith_instantiate<fvar<var>>();

      |   ^

In file included from test/unit/math/mix/fun_16_test.cpp:1:

In file included from ./test/unit/math/test_ad.hpp:4:

In file included from ./stan/math/mix.hpp:4:

In file included from ./stan/math/mix/meta.hpp:6:

In file included from ./stan/math/fwd/core.hpp:4:

In file included from ./stan/math/fwd/core/fvar.hpp:4:

In file included from ./stan/math/prim/meta.hpp:72:

In file included from ./stan/math/prim/meta/append_return_type.hpp:4:

In file included from ./stan/math/prim/fun/Eigen.hpp:22:

In file included from lib/eigen_3.4.0/Eigen/Dense:1:

In file included from lib/eigen_3.4.0/Eigen/Core:19:

In file included from lib/eigen_3.4.0/Eigen/src/Core/util/Macros.h:679:

In file included from /usr/local/include/c++/v1/cmath:316:

In file included from /usr/local/include/c++/v1/__math/hypot.h:15:

In file included from /usr/local/include/c++/v1/__math/exponential_functions.h:17:

/usr/local/include/c++/v1/__type_traits/promote.h:32:18: error: static assertion failed due to requirement 'is_arithmetic<stan::math::fvar<stan::math::var_value<double, void>>>::value'

   32 |   static_assert((is_arithmetic<_Args>::value && ...));

      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~

/usr/local/include/c++/v1/complex:1116:47: note: in instantiation of template class 'std::__promote<double, stan::math::fvar<stan::math::var_value<double>>>' requested here

 1116 | inline _LIBCPP_HIDE_FROM_ABI complex<typename __promote<_Tp, _Up>::type> pow(const _Tp& __x, const complex<_Up>& __y) {

      |                                               ^

test/unit/math/mix/fun_16_test.cpp:166:13: note: while substituting deduced template arguments into function template 'pow' [with _Tp = double, _Up = stan::math::fvar<stan::math::var_value<double>>, $2 = (no value)]

  166 |   auto d2 = pow(1.0, std::complex<T>(1.0));

      |             ^

test/unit/math/mix/fun_16_test.cpp:180:3: note: in instantiation of function template specialization 'expect_arith_instantiate<stan::math::fvar<stan::math::var_value<double>>>' requested here

  180 |   expect_arith_instantiate<fvar<var>>();

      |   ^

fatal error: too many errors emitted, stopping now [-ferror-limit=]

20 errors generated.

Expected Output

Compilation to succeed

It smells like #3006 may be related again, it looks like these asserts are in the complex functions

Current Version:

v4.9.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions