print: pair.hpp: default printer for std::pair<>
This commit is contained in:
parent
4c5992ae40
commit
bdde88ebae
1 changed files with 24 additions and 0 deletions
24
include/xo/indentlog/print/pair.hpp
Normal file
24
include/xo/indentlog/print/pair.hpp
Normal 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 */
|
||||
Loading…
Add table
Add a link
Reference in a new issue