iterator: add simple explanation of infix_iterator
This commit is contained in:
parent
acfbec871a
commit
77d5bf0cb7
10
iterator.hpp
10
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<value_type> (os, ", ")
|
||||
/// );
|
||||
template <
|
||||
typename T,
|
||||
class CharT = char,
|
||||
|
Loading…
Reference in New Issue
Block a user