print: pair.hpp: default printer for std::pair<>

This commit is contained in:
Roland Conybeare 2023-10-11 17:43:17 -04:00
commit bdde88ebae

View file

@ -0,0 +1,24 @@
/* @file pair.hpp */
#pragma once
#include <iostream>
#include <utility>
namespace std {
template <typename T, typename U>
inline std::ostream &
operator<<(std::ostream & os,
std::pair<T,U> const & x)
{
os << "["
<< x.first
<< " "
<< x.second
<< "]";
return os;
} /*operator<<*/
} /*namespace std*/
/* end pair.hpp */