xo-umbrella2/xo-unit/include/xo/unit/scaled_unit_iostream.hpp
Roland Conybeare d1fa15f248 Add 'xo-unit/' from commit 'b531e382c2'
git-subtree-dir: xo-unit
git-subtree-mainline: e9ee6992ca
git-subtree-split: b531e382c2
2025-05-10 21:29:43 -05:00

31 lines
790 B
C++

/** @file scaled_unit_iostream.hpp
*
* Author: Roland Conybeare
**/
#pragma once
#include "scaled_unit.hpp"
#include "natural_unit_iostream.hpp"
#include "xo/flatstring/int128_iostream.hpp"
#include <iostream>
namespace xo {
namespace qty {
template <typename Int, typename OuterScale>
inline std::ostream &
operator<<(std::ostream & os,
const scaled_unit<Int, OuterScale> & x)
{
os << "<scaled-unit"
<< xtag("outer_scale_factor", x.outer_scale_factor_)
<< xtag("outer_scale_sq", x.outer_scale_sq_)
<< xtag("bpuv", x.natural_unit_)
<< ">";
return os;
};
} /*namespace qty*/
} /*namespace xo*/
/** end scaled_unit_iostream.hpp **/