Namespaces
Variants

std::meta::is_unsigned_type

From cppreference.com
< cpp | meta
 
 
 
Reflection library
 
Reflection types and queries
Type properties
Type property queries
 
Defined in header <meta>
consteval bool is_unsigned_type( std::meta::info r );
(since C++26)

Returns true if r is a reflection of an unsigned arithmetic type. Otherwise returns false.

Parameters

r - a reflection value

Return value

true if r represents an unsigned arithmetic type; otherwise false.

Exceptions

Throws std::meta::exception if r does not represent a type or type alias.

Example

#include <meta>

static_assert(!is_unsigned_type(^^signed));
static_assert( is_unsigned_type(^^unsigned));
static_assert(!is_unsigned_type(^^int));
static_assert( is_unsigned_type(^^bool));
static_assert(!is_unsigned_type(^^float));

int main() {}

See also

checks if reflection represents a signed arithmetic type
(function) [edit]
checks if reflection represents an arithmetic type
(function) [edit]
obtains the corresponding unsigned type for reflected integral type
(function) [edit]
checks if a type is an unsigned arithmetic type
(class template) [edit]
checks if a type is an arithmetic type
(class template) [edit]
obtains the corresponding unsigned type for the given integral type
(class template) [edit]
[static]
identifies signed types
(public static member constant of std::numeric_limits<T>) [edit]
Morty Proxy This is a proxified and sanitized view of the page, visit original site.