xo-flatstring: + __int128 printer
This commit is contained in:
parent
23a9a647c7
commit
8afe90afd6
2 changed files with 51 additions and 0 deletions
31
include/xo/flatstring/int128_iostream.hpp
Normal file
31
include/xo/flatstring/int128_iostream.hpp
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/** @file int128_iostream.hpp
|
||||
*
|
||||
* Author: Roland Conybeare
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "flatstring.hpp"
|
||||
#include <ostream>
|
||||
|
||||
namespace std {
|
||||
/* print a 128-bit integer */
|
||||
inline std::ostream &
|
||||
operator<< (std::ostream & os, __int128 x) {
|
||||
os << xo::flatstring<48>::from_int(x);
|
||||
return os;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NOT_USING
|
||||
namespace xo {
|
||||
/* print a 128-bit integer */
|
||||
inline std::ostream &
|
||||
operator<< (std::ostream & os, __int128 x) {
|
||||
os << xo::flatstring<48>::from_int(x);
|
||||
return os;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/** end int128_iostream.hpp **/
|
||||
Loading…
Add table
Add a link
Reference in a new issue