How to unpack tuple in C++

Hi all,

I’m trying to unpack a std::tuple in C++ however using std::get doesn’t work and I’m not sure why. Is there I’m missing?

#include <torch/torch.h>

int main(){
  int64_t B = 4096;
  int64_t D = 4;
  int64_t N = 6;
  at::Tensor matrices = torch::randn(B,D,N,N);

  std::tuple<at::Tensor, at::Tensor> out = torch::linalg::slogdet(matrices);
  at::Tensor sign = std::get<0>(out); //fails
}

Thank you!