Help testing release candidate for std::complex

This can be done with a special function that exists in my branch called val, that allows demoting fvar, var, etc to an arbitrary level. For example, fvar<var> could stop at var rather than going down to double:

namespace Eigen{
namespace internal{
template<class T1,class T2/*,std::enable_if_t<!std::is_same<T1,T2>::value&&
 (stan::is_fr_var<T1>::value || stan::is_fr_var<T2>::value)>* =nullptr*/>
struct get_factor<std::complex<T1>,T2>{
 EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE T2 run(std::complex<T1>const&x){
  return stan::math::val<T1,T2>(numext::real(x));
 }
};
}  // namespace internal
} // namespace Eigen

Unfortunately, it gets deeper into the algorithm, and keeps trying to assign complex<var> to double elsewhere (similar to Bob’s first error novel, but not exact).

../eigen-git-mirror\Eigen/src/Core/products/GeneralBlockPanelKernel.h:527:23: fatal error: assigning to 'double' from incompatible type 'Eigen::internal::conj_helper<std::complex<stan::math::var>, double, false, false>::Scalar' (aka 'complex<stan::math::var>')
    tmp = b; tmp = cj.pmul(a,tmp); c = padd(c,tmp);
                   ~~~^~~~~~~~~~~
../eigen-git-mirror\Eigen/src/Core/products/GeneralBlockPanelKernel.h:1671:13: note: in instantiation of function template specialization 'Eigen::internal::gebp_traits<std::complex<stan::math::var>, double, false, false, 1, 0>::madd<std::complex<stan::math::var>, double, std::complex<stan::math::var>, Eigen::internal::FixedInt<0> >' requested here
            EIGEN_GEBP_ONESTEP(0);
            ^
../eigen-git-mirror\Eigen/src/Core/products/GeneralBlockPanelKernel.h:1652:22: note: expanded from macro 'EIGEN_GEBP_ONESTEP'
              traits.madd(A0, rhs_panel, C0, T0, fix<0>); 

This indicates that, at least for dynamic matrices, if one of them is complex and the other isn’t, and at least one of the underlying scalar types is an AD type, then both matrices should probably be cast to an AD version of their corresponding type (for example, complex double times var → cast complex double to complex var → then run multiplication).

I will see if it is possible to code it that way.