Namespaces
Variants

std::meta::is_namespace_member

cppreference.net에서
< cpp | meta
 
 
 
리플렉션 라이브러리
 
리플렉션 타입 및 쿼리
리플렉션 쿼리
리플렉션 레이아웃 쿼리
타입 속성
타입 속성 쿼리
 
헤더에 정의됨<meta>
consteval bool is_namespace_member( std::meta::info r );
(C++26부터)

true을(를) 반환합니다. r이(가) 네임스페이스 멤버를 나타내면, 그렇지 않으면 false을(를) 반환합니다.

매개변수

r - 리플렉션 값

반환값

true r이(가) 네임스페이스 멤버를 나타내면; 그렇지 않으면 false.

예제

#include <meta>

namespace A { int x; }

static_assert(std::meta::is_namespace_member(^^A::x));

int y;
static_assert(std::meta::is_namespace_member(^^y));

struct S
{
    int x;  
};
static_assert(!std::meta::is_namespace_member(^^S::x));

int main() {}

같이 보기

반영된 클래스 또는 네임스페이스의 접근 가능한 직접 멤버를 얻습니다
(함수)
리플렉션이 클래스 멤버를 나타내는지 확인합니다
(함수)