pflib
v3.14.3-4-g3289bd3
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
SpaceSeparated.h
1
#pragma once
2
#ifndef TOOL_SPACESEPARATED_H
3
#define TOOL_SPACESEPARATED_H
4
8
template
<
typename
Iterator>
9
class
SpaceSeparated
{
10
Iterator begin_;
11
Iterator end_;
12
13
public
:
14
SpaceSeparated
(Iterator begin, Iterator end) : begin_{begin}, end_{end} {}
15
friend
inline
std::ostream
& operator<<(
std::ostream
& o,
16
const
SpaceSeparated
& self) {
17
o <<
"["
;
18
for
(
auto
it{self.begin_}; it != self.end_; it++) {
19
o <<
" "
<< *it;
20
}
21
o <<
" ]"
;
22
return
o;
23
}
24
};
25
26
#endif
std::ostream
SpaceSeparated
emit an iterator-range as a space-separated list
Definition
SpaceSeparated.h:9
app
tool
SpaceSeparated.h
Generated by
1.12.0