📜  std::tuple 上的迭代器 - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:52.157000             🧑  作者: Mango

代码示例7
// prints every element of a tuple
template
void print(std::tuple& t) {
    std::cout << std::get(t) << " ";
    // do things
    if constexpr(I+1 != sizeof...(Tp))
        print(t);
}