Skip to content

Instantly share code, notes, and snippets.

@alecjacobson
Last active December 16, 2016 04:30
Show Gist options
  • Save alecjacobson/02f508d6517cc15708bb40b34bed0007 to your computer and use it in GitHub Desktop.
Save alecjacobson/02f508d6517cc15708bb40b34bed0007 to your computer and use it in GitHub Desktop.
Failing to recognize output types
#include <Eigen/Core>
#include <tuple>
template <
typename DerivedO0,
typename DerivedO1,
typename DerivedI0,
typename DerivedI1>
std::tuple<
Eigen::MatrixBase<DerivedO0>,
Eigen::MatrixBase<DerivedO1>
>
test(
const Eigen::MatrixBase<DerivedI0> & I0,
const Eigen::MatrixBase<DerivedI1> & I1)
{
// return std::tuple<Eigen::MatrixBase<DerivedO0>, Eigen::MatrixBase<DerivedO1> >{I0,I1};
return {I0,I1};
}
int main()
{
using namespace Eigen;
MatrixXd V,U;
MatrixXi F,G;
// std::tie(U,G) = test<Eigen::MatrixXd,Eigen::MatrixXi>(V,F);
std::tie(U,G) = test(V,F);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment