xo-object2: type registration + gc fixes

This commit is contained in:
Roland Conybeare 2026-01-02 09:53:23 -05:00
commit d5201d2a31

View file

@ -96,6 +96,17 @@ namespace xo {
template <typename AFacet, typename DRepr>
using FacetImplType = FacetImplementation<AFacet, DRepr>::ImplType;
/** Use:
* auto iface = xo::facet::impl_for<AGCObject, DList>();
* if compiles, then iface is AGCObject interface with state DList.
**/
template <typename AFacet, typename DRepr>
inline auto impl_for() {
FacetImplType<AFacet, DRepr> iface;
return iface;
}
/** Data type for facet implementation that supports runtime polymorphism.
* Implementation will stub all methods, since they will never be invoked.
*