xo-reflect: + Reflect::is_native<T>()
This commit is contained in:
parent
dddd6ca5ec
commit
8a20796fe9
1 changed files with 6 additions and 0 deletions
|
|
@ -227,6 +227,12 @@ namespace xo {
|
|||
return retval_td;
|
||||
}
|
||||
|
||||
/** true iff @p src_td is a type-description for @tparam T **/
|
||||
template <typename T>
|
||||
static bool is_native(TypeDescr src_td) {
|
||||
return (require<T>() == src_td);
|
||||
}
|
||||
|
||||
/** given address @p src_address of a value with type described by @p src,
|
||||
* return typed pointer of type @tparam T, provided that @p src_td
|
||||
* actually describes @tparam T. Otherwise returns nullptr
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue