xo-refcnt: feat: printing for brw<T>

This commit is contained in:
Roland Conybeare 2024-08-06 13:01:43 -04:00
commit 7c59381604

View file

@ -329,6 +329,17 @@ namespace xo {
return Borrow<T>(*this);
} /*borrow*/
template<typename T>
inline std::ostream &
operator<<(std::ostream & os, Borrow<T> x) {
if (x) {
os << *x;
} else {
os << "<nullptr " << reflect::type_name<T>() << ">";
}
return os;
} /*operator<<*/
} /*namespace ref*/
} /*namespace xo*/