From bdde88ebae9f396c3e9f2a9e8e02ae627de35182 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Wed, 11 Oct 2023 17:43:17 -0400 Subject: [PATCH] print: pair.hpp: default printer for std::pair<> --- include/xo/indentlog/print/pair.hpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 include/xo/indentlog/print/pair.hpp diff --git a/include/xo/indentlog/print/pair.hpp b/include/xo/indentlog/print/pair.hpp new file mode 100644 index 00000000..0453fba0 --- /dev/null +++ b/include/xo/indentlog/print/pair.hpp @@ -0,0 +1,24 @@ +/* @file pair.hpp */ + +#pragma once + +#include +#include + +namespace std { + template + inline std::ostream & + operator<<(std::ostream & os, + std::pair const & x) + { + os << "[" + << x.first + << " " + << x.second + << "]"; + + return os; + } /*operator<<*/ +} /*namespace std*/ + +/* end pair.hpp */