diff --git a/iterator.hpp b/iterator.hpp index 892ef45c..0d807c87 100644 --- a/iterator.hpp +++ b/iterator.hpp @@ -71,6 +71,16 @@ class referencing_iterator { namespace util { /////////////////////////////////////////////////////////////////////////// + /// an output iterator that inserts a delimiter between successive + /// assignments + /// + /// very useful for outputting comma seperated lists to an ostream, eg: + /// + /// std::copy ( + /// std::cbegin (container), + /// std::cend (container), + /// util::infix_iterator (os, ", ") + /// ); template < typename T, class CharT = char,