From 44d6a613a2503d93736b06a2dc2c5ae6c452336c Mon Sep 17 00:00:00 2001 From: subcrip Date: Thu, 28 Nov 2024 10:39:56 +0000 Subject: [PATCH] Update template.cc Signed-off-by: subcrip --- template.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/template.cc b/template.cc index a4f9ea4..176990e 100644 --- a/template.cc +++ b/template.cc @@ -183,6 +183,10 @@ template istream& operator>>(istream& in, array& a) for (size_t i = 0; i < N; ++i) in >> a[i]; return in; } +template ostream& operator<<(ostream& out, const array& a) { + for (auto&& i : a) out << i << ' '; + return out; +} template void print_tuple_impl(std::basic_ostream& os, const Tuple& t, std::index_sequence) { using swallow = int[]; // guaranties left to right order