I've got a templated function with a signature like ReturnType foo(AnEigenMatrixType bar) where AnEigenMatrixType can be an instantiation of Eigen::Matrix<...>. I'd like ReturnType to be AnEigenMatrixType with its SelfAdjointBit set because I know the computation in foo() guarentees me a self-adjoint result.
I noticed that MatrixBase<Derived> has AdjointReturnType used in adjoint(), but my attempts like Eigen::MatrixBase<Eigen::Matrix<Scalar,3,1> >::AdjointReturnType haven't worked (public-vs-private, but it could be me being dumb with templates). Functionality like part<Eigen::SelfAdjoint> doesn't quite do what I'd like because I want to propagate the self-adjointedness of ReturnType back out to other routines.