From 0f89542e116b02d9c025c9b10a7217e5cfeb95c9 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Sat, 26 Jul 2025 17:28:41 -0400 Subject: [PATCH] xo-expression xo-reader: type unifier + misc improvements --- include/xo/reflect/TypeDescr.hpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/include/xo/reflect/TypeDescr.hpp b/include/xo/reflect/TypeDescr.hpp index 53247ad..57deb81 100644 --- a/include/xo/reflect/TypeDescr.hpp +++ b/include/xo/reflect/TypeDescr.hpp @@ -518,11 +518,21 @@ namespace xo { }; /*TypeDescrBase*/ inline std::ostream & - operator<<(std::ostream & os, TypeDescrBase const & x) { + operator<<(std::ostream & os, const TypeDescrBase & x) { x.display(os); return os; } /*operator<<*/ + inline std::ostream & + operator<<(std::ostream & os, const TypeDescrBase * p) { + if (p) + p->display(os); + else + os << ""; + return os; + } + + /* tag to drive overload resolution */ struct reflected_types_printer {};