Your function is returning two tensors and not one. To return multiple tensors in C++ return tuple of tensors as follows
// c++14
std::tuple<torch::Tensor, torch::Tensor> foo(const torch::Tensor& a, const torch::Tensor& b)
{
  torch::Tensor op1 = a + b / a - b;
  torch::Tensor op2 = torch::randn({1}) * op1;

  return std::make_tuple(op1, op2); 
}

// On the calling side
torch::Tensor tensor1, tensor2;
std::tie(tensor1, tensor2) = foo(torch::randn({3, 2, 2}), torch::randn({3, 2, 2}));