colour: prefer to avoid stream::numeric for output
This commit is contained in:
parent
b867298093
commit
87482522d7
14
colour.cpp
14
colour.cpp
@ -378,20 +378,18 @@ namespace util {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
template <size_t S, typename T>
|
template <size_t S, typename T>
|
||||||
std::ostream&
|
std::ostream&
|
||||||
util::operator<< (std::ostream &os, util::colour<S,T> c) {
|
util::operator<< (std::ostream &os, util::colour<S,T> c) {
|
||||||
os << "[";
|
os << "colour(";
|
||||||
std::transform (std::cbegin (c),
|
for (size_t i = 0; i < S - 1; ++i)
|
||||||
std::cend (c),
|
os << +c[i] << ", ";
|
||||||
infix_iterator<stream::numeric<T>> (os, ", "),
|
os << +c[S-1] << ")";
|
||||||
stream::to_numeric<T>);
|
|
||||||
os << "]";
|
|
||||||
|
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#define INSTANTIATE_S_T(S,T) \
|
#define INSTANTIATE_S_T(S,T) \
|
||||||
template struct util::colour<S,T>; \
|
template struct util::colour<S,T>; \
|
||||||
|
Loading…
Reference in New Issue
Block a user