Retrieving the encoded content

std::copy(section->begin(), section->end(),
          std::ostreambuf_iterator<char>(std::cout));

The object referenced by x::mime::encoder has begin() and end() methods that return x::mime::encoder::base::iterators of an input sequence over char returning a complete MIME entity, with the header and the body portion.

A container given to x::mime::make_section() that returns forward, bidirectional, or random access iterators results in the x::mime::encoder::base::iterators also meeting the requirements of forward iterators (but not bidirectional or random) as well, however the x::mime::encoder::base::iterator's official iterator trait is still a std::input_iterator_tag. Similarly, a multipart MIME section can come from different MIME entities, some of them built from input iterators, some of them not. If any constituent MIME entity came from a container that produces input iterators, the resulting multipart MIME section's iterators are input iterators, otherwise they'll meet forward iterator requirements, too.