std::meta::has_parent
From cppreference.com
| Defined in header <meta>
|
||
consteval bool has_parent( std::meta::info r );
|
(since C++26) | |
Determines whether r represents an entity with a parent.
The result is determined as follows:
- If
rrepresents the global namespace, returnsfalse. - Otherwise, if
rrepresents an entity that has "C" language linkage, returnsfalse. - Otherwise, if
rrepresents an entity that has a language linkage other than "C++" language linkage, returns an implementation-defined value. - Otherwise, if
rrepresents a type that is neither class nor enumeration type, returnsfalse. - Otherwise, if
rrepresents an entity or direct base class relationship, returnstrue. - Otherwise, returns
false.
Parameters
| r | - | a reflection value |
Return value
true if r has a parent, false otherwise.
Example
| This section is incomplete Reason: no example |
See also
(C++26) |
obtains the scope that contains the reflected entity (function) |