More work on debug_string

This commit is contained in:
2021-07-21 16:10:29 -04:00
parent c2a69b5b23
commit 49a4ec220d
6 changed files with 142 additions and 95 deletions

View File

@@ -66,6 +66,17 @@ struct XYZ {
std::string debug_string() const;
};
// These are formatting directives that can be sent to a std::ostream.
class hex64 {};
class hex32 {};
class hex16 {};
class hex8 {};
} // namespace util
std::ostream &operator<<(std::ostream &oss, const util::hex64 &v);
std::ostream &operator<<(std::ostream &oss, const util::hex32 &v);
std::ostream &operator<<(std::ostream &oss, const util::hex16 &v);
std::ostream &operator<<(std::ostream &oss, const util::hex8 &v);
#endif // UTIL_HPP