std::meta::has_parent
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
See also
|
(C++26) | obtains the scope that contains the reflected entity (function) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/cpp/meta/has_parent