Spec-Zone.ru › C++

std::meta::subobjects_of

Defined in header <meta>
consteval std::vector<std::meta::info>
    subobjects_of( std::meta::info type, std::meta::access_context ctx );
(since C++26)

Returns a std::vector containing reflections of direct base class relationships and non-static data members of the class represented by type, filtered by the access context ctx.

Effectively returns the concatenation of std::meta::bases_of(type, ctx) and std::meta::nonstatic_data_members_of(type, ctx), preserving the element order.

Parameters

type - a reflection of complete class type
ctx - an access context

Return value

A vector containing each base and non-static data member of the class represented by std::meta::dealias(type), as described above.

Exceptions

Throws std::meta::exception unless std::meta::dealias(type) represents a class type that is complete from some point in the evaluation context.

Example

See also

members_of
(C++26)
obtains the accessible direct members of the reflected class or namespace
(function)
bases_of
(C++26)
obtains the accessible direct bases of the reflected class
(function)
is_accessible
(C++26)
checks if a member is accessible in a given context
(function)

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/cpp/meta/subobjects_of

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API