diff --git a/colour.cpp b/colour.cpp index ff11cb4b..238bcc53 100644 --- a/colour.cpp +++ b/colour.cpp @@ -384,12 +384,9 @@ namespace json::tree { /////////////////////////////////////////////////////////////////////////////// template std::ostream& -util::operator<< (std::ostream &os, util::colour c) { - os << "colour("; - for (size_t i = 0; i < S - 1; ++i) - os << +c[i] << ", "; - os << +c[S-1] << ")"; - return os; +util::operator<< (std::ostream &os, util::colour c) +{ + return os << "[ " << util::make_infix (util::numeric_view (c), ", ") << ']'; } @@ -438,8 +435,10 @@ util::operator>> (std::istream &is, util::colour &c) return is; } +//----------------------------------------------------------------------------- template std::istream& util::operator>> (std::istream&, util::colour<3,uint8_t>&); + /////////////////////////////////////////////////////////////////////////////// #define INSTANTIATE_S_T(S,T) \ template \