std::meta::is_namespace
From cppreference.com
| Defined in header <meta>
|
||
consteval bool is_namespace( std::meta::info r );
|
(since C++26) | |
Returns true if r represents an entity whose underlying entity is a namespace. Otherwise returns false.
Parameters
| r | - | a reflection value |
Return value
true if r represents a namespace; otherwise false.
Example
Run this code
#include <meta>
static_assert(is_namespace(^^std));
static_assert(!is_namespace(^^int));
int main() {}
See also
(C++26) |
checks if reflection represents a namespace alias (function) |
(C++26) |
checks if reflection represents a namespace member (function) |
(C++26) |
returns a reflection of the enclosing namespace (function) |