Namespaces
Variants

std::meta::has_internal_linkage, std::meta::has_module_linkage, std::meta::has_external_linkage, std::meta::has_linkage

From cppreference.com
< cpp | meta
Defined in header <meta>
consteval bool has_internal_linkage( std::meta::info r );
(1) (since C++26)
consteval bool has_module_linkage( std::meta::info r );
(2) (since C++26)
consteval bool has_external_linkage( std::meta::info r );
(3) (since C++26)
consteval bool has_linkage( std::meta::info r );
(4) (since C++26)

Determines if r represents a variable, function, type, template, or namespace whose name has the specified linkage.

1) Returns true if r represents an entity whose name has internal linkage; otherwise returns false.
2) Returns true if r represents an entity whose name has module linkage; otherwise returns false.
3) Returns true if r represents an entity whose name has external linkage; otherwise returns false.
4) Returns true if r represents an entity whose name has any linkage; otherwise returns false.

Parameters

r - a reflection value

Return value

true if r represents an entity whose name has the specified linkage; otherwise false.

Notes

If r does not represent an entity, the result is false.

Example

See also