Line data Source code
1 : /** @file Quantity2_iostream.hpp 2 : * 3 : * Author: Roland Conybeare 4 : **/ 5 : 6 : #pragma once 7 : 8 : #include "Quantity.hpp" 9 : #include <iostream> 10 : 11 : namespace xo { 12 : namespace qty { 13 : template <typename Repr = double, 14 : typename Int = std::int64_t> 15 : inline std::ostream & 16 11 : operator<< (std::ostream & os, 17 : const Quantity<Repr, Int> & x) 18 : { 19 11 : os << "<qty" 20 22 : << xtag("scale", x.scale()) 21 11 : << xtag("unit", x.unit()) 22 11 : << ">"; 23 : 24 11 : return os; 25 : } 26 : } /*namespace qty*/ 27 : } /*namespace xo*/ 28 : 29 : /** end Quantity2_iostream.hpp **/