diff options
-rw-r--r-- | number.cpp | 6 | ||||
-rw-r--r-- | number.h | 3 |
2 files changed, 9 insertions, 0 deletions
@@ -145,3 +145,9 @@ number::operator!=(const number &n) const } /* }}} */ + +std::ostream & +operator<<(std::ostream &os, const number &n) +{ + return os << n.to_hex_string(); +} @@ -1,6 +1,7 @@ #pragma once #include <list> +#include <ostream> #include <cstdint> @@ -77,3 +78,5 @@ private: /* First item is the least significant. */ std::list<std::uint64_t> _operands; }; + +std::ostream &operator<<(std::ostream &, const number &); |