make to_string for uuid_t const (like i should have to begin with)

This commit is contained in:
Fabian Posch 2024-01-11 17:21:49 -05:00
parent 5b06d041b2
commit 9afc044002

View file

@ -78,7 +78,7 @@ inline bool operator!=(int const & lhs, uuid_t const & rhs) {
// easier conversion to string
inline std::string to_string(uuid_t const &value) {
inline std::string to_string(const uuid_t& value) {
std::ostringstream uuid_s;
uuid_s << std::hex;
uuid_s << std::setfill('0') << std::setw(16) << value.uuid_upper;
@ -87,7 +87,7 @@ inline std::string to_string(uuid_t const &value) {
}
// stream operations
inline std::ostream& operator<<(std::ostream& os, uuid_t& value) {
inline std::ostream& operator<<(std::ostream& os, const uuid_t& value) {
os << to_string(value);
return os;
};