Answers for "tuple c++"

C++
2

tuple c++

#include <tuple>

std::tuple<char, int, bool> my_tuple = {'H', 56, false};
Posted by: Guest on April-16-2022
1

c++ tuple

std::tuple<int, int> foo_tuple() 
{
  return {1, -1};  // Error until N4387
  return std::tuple<int, int>{1, -1}; // Always works
  return std::make_tuple(1, -1); // Always works
}
Posted by: Guest on February-17-2022

Browse Popular Code Answers by Language