Namespaces
Variants

std::meta::is_bounded_array_type

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

Returns true if r represents an array type of known bound. Otherwise returns false.

Parameters

r - a reflection value

Return value

true if r represents an array type of known bound; otherwise false.

Exceptions

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

Example

#include <meta>

class A {};

static_assert(!is_bounded_array_type(^^A));
static_assert(!is_bounded_array_type(^^A[]));
static_assert( is_bounded_array_type(^^A[3]));
static_assert(!is_bounded_array_type(^^float));
static_assert(!is_bounded_array_type(^^int));
static_assert(!is_bounded_array_type(^^int[]));
static_assert( is_bounded_array_type(^^int[3]));

int main() {}

See also

checks if reflection represents an array type of unknown bound
(function) [edit]
checks if reflected type is an array type
(function) [edit]
(C++26)
obtains the size of reflected array type along a specified dimension
(function) [edit]
(C++26)
obtains the number of dimensions of reflected array type
(function) [edit]
removes one extent from reflected array type
(function) [edit]
removes all extents from reflected array type
(function) [edit]
checks if reflected type is a scalar type
(function) [edit]
checks if a type is an array type of known bound
(class template) [edit]