xo-flatstring: + __int128 printer

This commit is contained in:
Roland Conybeare 2024-04-28 14:44:35 -04:00
commit 8afe90afd6
2 changed files with 51 additions and 0 deletions

View 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 **/