xo-facet: + _has_null_vptr() helper.
Will be load-bearing for gc
This commit is contained in:
parent
26466c5bda
commit
7a26533012
1 changed files with 5 additions and 0 deletions
|
|
@ -58,6 +58,11 @@ public:
|
|||
///@{
|
||||
{% endif %}
|
||||
// const methods
|
||||
/** An uninitialized {{abstract_facet}} instance will have zero vtable pointer (per {linux,osx} abi).
|
||||
* Use case for this is narrow. We go to some lengths to avoid null vtable pointers. For example
|
||||
* obj<AFacet> will have non-null vtable (via IFacet_Any) with all methods terminating.
|
||||
**/
|
||||
bool _has_null_vptr() const noexcept { return *reinterpret_cast<const void * const *>(this) == nullptr; }
|
||||
/** RTTI: unique id# for actual runtime data representation **/
|
||||
virtual typeseq _typeseq() const noexcept = 0;
|
||||
/** destroy instance @p d; calls c++ dtor only for actual runtime type; does not recover memory **/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue