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