xo-object2: type registration + gc fixes
This commit is contained in:
parent
0c06430703
commit
d5201d2a31
1 changed files with 11 additions and 0 deletions
|
|
@ -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.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue