Библиотека Boost С++ имеет шаблон шаблона функций
Шаблоны классов tee_filter и tee_device предоставляют два способа разделения выходной последовательности так что все данные направляются одновременно в два разных местоположения.
Я ищу полный пример С++, используя Boost tee для вывода на стандартный выход и в файл типа sample.txt.