Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

iterator on std::tuple

#include <tuple>
#include <iostream>

int main()
{
    std::tuple t{42, 'a', 4.2}; // Another C++17 feature: class template argument deduction
    std::apply([](auto&&... args) {((std::cout << args << '
'), ...);}, t);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #iterator
ADD COMMENT
Topic
Name
7+7 =