Spec-Zone.ru › C++

std::meta::is_public, std::meta::is_protected, std::meta::is_private

Defined in header <meta>
consteval bool is_public( std::meta::info r );
(1) (since C++26)
consteval bool is_protected( std::meta::info r );
(2) (since C++26)
consteval bool is_private( std::meta::info r );
(3) (since C++26)

Determines if r represents a class member or direct base class relationship with the specified access.

Formally, returns true if r represents either:

  • a class member or unnamed bit-field that is public, protected, or private, respectively, or
  • a direct base class relationship (D, B) for which B is, respectively, a public, protected, or private base class of D.

Otherwise, returns false.

Parameters

r - a reflection value

Return value

true if r represents a member or direct base class relationship with the given access, otherwise false

Example

See also

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/is_public

Spec-Zone.ru

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