Opened 10 years ago

Closed 10 years ago

#770 closed request (fixed)

ostream_iterator with no separator after last element

Reported by: Peter Owned by: Peter
Priority: major Milestone: yat 0.12
Component: utility Version:
Keywords: Cc:


std::ostream_iterator is very useful, but often it becomes useless because I don't want a separator after last element. For example, if I output a series of number I typically want something like

2, 3, 5, 7 

i.e., no ", " after '7'. It should be useful to have an ostream_iterator that behaves this way. Implementation-wise I guess one should think of it that it injects a separator before all elements except the first.

Change History (4)

comment:1 Changed 10 years ago by Peter

Milestone: yat 0.x+yat 0.12
Type: discussionrequest

comment:2 Changed 10 years ago by Peter

(In [3151]) implement OstreamIterator? refs #770

comment:3 Changed 10 years ago by Peter

(In [3152]) add missing source file. refs #770

comment:4 Changed 10 years ago by Peter

Resolution: fixed
Status: newclosed

(In [3153]) document OstreamIterator? closes #770

Note: See TracTickets for help on using tickets.