This is an example of how to use the flatten() function, using ranges.
It outputs "Hello, World!"
#include <exptl/algorithm>
#include <iostream>
#include <iterator>
#include <span>
#include <vector>
int main()
{
using std::cout, std::ostream_iterator, std::span, std::vector;
vector<vector<vector<int>>> v[][3]{
{{}, {{{72}}}, {{{101, 108}}}},
{{{{108, 111}, {44, 32, 87}}}, {{{111}}, {{114}}, {{108}}}, {{{100}}}},
{{{{33}, {10}}}}};
flatten<int>(span{v}, ostream_iterator<char>(cout));
}
void flatten(In begin, In const end, Out out)
Extracts elements from nested containers.
Definition: algorithm.hpp:37