Standard library header <meta> (C++26)
From cppreference.com
Includes | |
(C++20) |
Three-way comparison operator support |
(C++11) |
std::initializer_list class template |
Concepts | |
Defined in namespace
std::meta | |
(C++26) |
specifies a range of reflection values (concept) |
Types | |
Defined in namespace
std::meta | |
(C++26) |
the type of reflection values (typedef) |
(C++26) |
exception thrown by reflection functions (class) |
(C++26) |
a context for access checking (class) |
(C++26) |
data member options including name, alignment, and bit width (class) |
(C++26) |
the offset of a member or base class relative to its enclosing class (class) |
(C++26) |
constants that identify overloadable operators (enum) |
Functions | |
Defined in namespace
std::meta | |
Promoting compile-time storage into static storage | |
(C++26) |
promotes a compile-time string to static storage, returning a reflection representing the static string (function template) |
(C++26) |
promotes compile-time array into static storage, returning a reflection representing the static array (function template) |
(C++26) |
promotes compile-time string to static storage, returning a pointer to the first character of the static string (function template) |
(C++26) |
promotes compile-time array into static storage, returning a span of the static array (function template) |
(C++26) |
promotes compile-time value into static storage, returning a pointer to the static object (function template) |
Operator representations | |
(C++26) |
identifies the operator represented by the reflection (function) |
(C++26)(C++26) |
converts a meta::operators enumerator to its symbolic name (function) |
Reflection names and locations | |
(C++26) |
checks if reflection represents an entity that has an identifier (function) |
(C++26)(C++26) |
if the reflected entity has an identifier, obtains its name (function) |
(C++26)(C++26) |
obtains a string suitable for identifying the reflected entity (function) |
(C++26) |
obtains the source location of the reflected entity (function) |
Reflection queries | |
(C++26) |
determines the type of the reflected entity (function) |
(C++26) |
obtains a reflection of the object of the reflected variable (function) |
(C++26) |
obtains a reflection of the constant value of the reflected entity (function) |
(C++26)(C++26)(C++26) |
checks if reflection represents a public, protected, or private member or base class (function) |
(C++26) |
checks if reflection represents a virtual member function or virtual base class (function) |
(C++26) |
checks if reflection represents a pure virtual member function (function) |
(C++26) |
checks if reflection represents a member function that overrides another member function (function) |
(C++26) |
checks if reflection represents a final class or final member function (function) |
(C++26) |
checks if reflection represents a deleted function (function) |
(C++26) |
checks if reflection represents a defaulted function (function) |
(C++26) |
checks if reflection represents a user-provided function (function) |
(C++26) |
checks if reflection represents a user-declared function (function) |
(C++26) |
checks if reflection represents a member function that is declared explicit (function) |
(C++26) |
checks if reflection represents a noexcept function or function type (function) |
(C++26) |
checks if reflection represents a bit-field or a data member description of bit-field (function) |
(C++26) |
checks if reflection represents an enumerator (function) |
(C++26) |
checks if reflection represents an annotation (function) |
(C++26) |
checks if reflection represents a const type or a function type with const qualifier (function) |
(C++26) |
checks if reflection represents a volatile type or a function type with volatile qualifier (function) |
(C++26) |
checks if reflection represents a mutable non-static data member (function) |
| checks if the reflected entity is a ref qualified member function (function) | |
(C++26)(C++26)(C++26) |
checks if the reflected entity has a storage duration (function) |
(C++26)(C++26)(C++26)(C++26) |
checks if the reflected entity has a linkage (function) |
(C++26) |
checks if the reflected entity has "C" language linkage (extern "C") (function) |
(C++26) |
checks if reflection represents a complete type (function) |
(C++26) |
checks if the reflected type has its list of members completely defined (function) |
(C++26) |
checks if reflection represents a variable (function) |
(C++26) |
checks if reflection represents a type (function) |
(C++26) |
checks if reflection represents a namespace (function) |
(C++26) |
checks if reflection represents a type alias (function) |
(C++26) |
checks if reflection represents a namespace alias (function) |
(C++26) |
checks if reflection represents a function (function) |
(C++26) |
checks if reflection represents a conversion function (function) |
(C++26) |
checks if reflection represents an operator overload (function) |
(C++26) |
checks if reflection represents a user-defined literal operator (function) |
(C++26) |
checks if reflection represents a special member function (function) |
(C++26)(C++26)(C++26)(C++26) |
checks if the reflected entity is a constructor of this kind (function) |
(C++26)(C++26)(C++26) |
checks if the reflected entity is an assignment operator of this kind (function) |
(C++26) |
checks if the reflected entity is a destructor (function) |
(C++26) |
checks if reflection represents a function parameter (function) |
(C++26) |
checks if reflection represents an explicit object parameter (function) |
(C++26) |
checks if reflected function parameter has a default argument (function) |
(C++26) |
checks if reflection represents a function or function type with an ellipsis parameter (function) |
(C++26) |
checks if reflected entity is a template (function) |
(C++26) |
checks if reflected entity is a function template (function) |
(C++26) |
checks if reflected entity is a variable template (function) |
(C++26) |
checks if reflected entity is a class template (function) |
(C++26) |
checks if reflected entity is a alias template (function) |
| checks if reflected entity is a conversion function template (function) | |
| checks if reflected entity is an operator function template (function) | |
(C++26) |
checks if reflected entity is a literal operator template (function) |
(C++26) |
checks if reflected entity is a constructor template (function) |
(C++26) |
checks if reflection represents a concept (function) |
(C++26) |
checks if reflection represents a (scalar) value (function) |
(C++26) |
checks if reflection represents a static object (function) |
(C++26) |
checks if reflection represents a structured binding (function) |
(C++26) |
checks if reflection represents a class member (function) |
(C++26) |
checks if reflection represents a namespace member (function) |
(C++26) |
checks if reflection represents a non-static data member (function) |
(C++26) |
checks if reflection represents a static class member (function) |
(C++26) |
checks if reflection represents a direct base class relationship (function) |
| checks if reflected non-static data member has a default member initializer (function) | |
(C++26) |
checks if the reflected entity is contained in a scope (function) |
(C++26) |
obtains the scope that contains the reflected entity (function) |
(C++26) |
determines the underlying entity of the reflected type/namespace alias (function) |
(C++26) |
checks if reflected entity is produced by substituting template arguments into a template (function) |
(C++26) |
determines the template used to instantiate the reflected entity (function) |
(C++26) |
obtains the template arguments of the reflected entity (function) |
(C++26) |
obtains the parameters of the reflected function (function) |
(C++26) |
obtains the variable of the reflected function parameter in the function definition (function) |
(C++26) |
obtains the return type of the reflected function (function) |
Accessibility queries | |
(C++26) |
checks if a member is accessible in a given context (function) |
| checks if the reflected class has any inaccessible non-static data members (function) | |
(C++26) |
checks if the reflected class has any inaccessible direct base classes (function) |
(C++26) |
checks if the reflected class has any inaccessible non-static data members or direct base classes (function) |
Scope identification | |
(C++26) |
returns a reflection of the enclosing function (function) |
(C++26) |
returns a reflection of the enclosing class (function) |
(C++26) |
returns a reflection of the enclosing namespace (function) |
Reflection member queries | |
(C++26) |
obtains the accessible direct members of the reflected class or namespace (function) |
(C++26) |
obtains the accessible direct bases of the reflected class (function) |
(C++26) |
obtains the accessible static data members of the reflected class (function) |
(C++26) |
obtains the accessible non-static data members of the reflected class (function) |
(C++26) |
obtains the accessible base class subobjects and non-static data members of the reflected class (function) |
(C++26) |
obtains the enumerators of the reflected enum type (function) |
Reflection layout queries | |
(C++26) |
returns the offset of a (member or base) subobject relative to its enclosing class (function) |
(C++26) |
returns the size in bytes of the reflected object or type (function) |
(C++26) |
returns the alignment of the reflected object or type (function) |
(C++26) |
returns the size in bits of the reflected object or type (function) |
Annotation reflection | |
(C++26) |
obtains the annotations applying to the reflected entity (function) |
(C++26) |
obtains the annotations that apply to the reflected entity and have the specified type (function) |
Value extraction | |
(C++26) |
extracts the value of the reflected entity (function template) |
Reflection substitution | |
(C++26) |
checks whether the reflected arguments can be substituted in the reflected template (function template) |
(C++26) |
substitutes reflected arguments in the reflected template (function template) |
Expression result reflection | |
(C++26) |
returns a reflection representing a value or template parameter object, suitable for use as a constant template argument (function template) |
(C++26) |
returns a reflection representing an object, suitable for use as a constant template argument (function template) |
(C++26) |
returns a reflection representing a function, suitable for use as a constant template argument (function template) |
Class definition generation | |
(C++26) |
creates a data member description for use with injected declarations (function) |
(C++26) |
checks if reflection represents a data member description (function) |
(C++26) |
defines an aggregate type from a sequence of data member descriptions (function template) |
Primary type categories | |
(C++26) |
checks if reflected type is void (function) |
(C++26) |
checks if reflected type is std::nullptr_t (function) |
(C++26) |
checks if reflected type is an integral type (function) |
(C++26) |
checks if reflected type is a floating-point type (function) |
(C++26) |
checks if reflected type is an array type (function) |
(C++26) |
checks if reflected type is a pointer type (function) |
(C++26) |
checks if reflection represents an lvalue reference (function) |
(C++26) |
checks if reflection represents an rvalue reference (function) |
| checks if reflection represents a member object pointer type (function) | |
| checks if reflection represents a member function pointer type (function) | |
(C++26) |
checks if reflected type is an enumeration type (function) |
(C++26) |
checks if reflected type is a union type (function) |
(C++26) |
checks if reflected type is a non-union class type (function) |
(C++26) |
checks if reflected type is a function type (function) |
(C++26) |
checks if reflected type is std::meta::info (function) |
Composite type categories | |
(C++26) |
checks if reflection represents either an lvalue reference or rvalue reference (function) |
(C++26) |
checks if reflection represents an arithmetic type (function) |
(C++26) |
checks if reflection represents a fundamental type (function) |
(C++26) |
checks if reflected type is an object type (function) |
(C++26) |
checks if reflected type is a scalar type (function) |
(C++26) |
checks if reflected type is a compound type (function) |
(C++26) |
checks if reflection represents a member pointer type (function) |
Type properties | |
(C++26) |
checks if reflection represents a const-qualified type (function) |
(C++26) |
checks if reflection represents a volatile-qualified type (function) |
(C++26) |
checks if reflection represents a trivially copyable type (function) |
(C++26) |
checks if reflected type is a standard-layout type (function) |
(C++26) |
checks if reflected type is a class (but not union) type and has no non-static data members (function) |
(C++26) |
checks if reflected type is a polymorphic class type (function) |
(C++26) |
checks if reflected type is an abstract class type (function) |
(C++26) |
checks if reflected type is a final class type (function) |
(C++26) |
checks if reflected type is an aggregate type (function) |
(C++26) |
checks if reflected type is a structural type (function) |
(C++26) |
checks if reflection represents a signed arithmetic type (function) |
(C++26) |
checks if reflection represents an unsigned arithmetic type (function) |
(C++26) |
checks if reflection represents an array type of known bound (function) |
(C++26) |
checks if reflection represents an array type of unknown bound (function) |
(C++26) |
checks if reflection represents a scoped enumeration type (function) |
(C++26)(C++26)(C++26) |
checks if reflected type has a constructor for specific arguments (function template) |
| checks if reflected type has a default constructor (function) | |
| checks if reflected type has a copy constructor (function) | |
| checks if reflected type can be constructed from an rvalue reference (function) | |
(C++26)(C++26)(C++26) |
checks if reflected type has an assignment operator for a specific argument (function) |
| checks if reflected type has a copy assignment operator (function) | |
| checks if reflected type has a move assignment operator (function) | |
(C++26)(C++26)(C++26)(C++26) |
checks if objects of one reflected type can be swapped with objects of same or different other reflected type (function) |
(C++26)(C++26)(C++26) |
checks if reflected type has a non-deleted destructor (function) |
(C++26) |
checks if reflected type is an implicit-lifetime type (function) |
(C++26) |
checks if reflected type has a virtual destructor (function) |
| checks if every bit in reflected type's object representation contributes to its value (function) | |
| checks if a reference is bound to a temporary in direct-initialization (function) | |
| checks if a reference is bound to a temporary in copy-initialization (function) | |
Type property queries | |
(C++26) |
obtains the number of dimensions of reflected array type (function) |
(C++26) |
obtains the size of reflected array type along a specified dimension (function) |
Type relations | |
(C++26) |
checks if two reflections represent the same type (function) |
(C++26) |
checks if two reflections represent types such that one type is a base of the other type (function) |
(C++26) |
checks if two reflections represent types such that one type is a virtual base of the other type (function) |
(C++26)(C++26) |
checks if reflected type can be converted to the other type (function) |
(C++26) |
checks if two reflections represent layout-compatible types (function) |
| checks if reflected type is a pointer-interconvertible base of another type (function) | |
(C++26)(C++26)(C++26)(C++26) |
checks if the reflected type can be invoked (as if by std::invoke) with the given argument types (function template) |
Const-volatile modifications | |
(C++26)(C++26)(C++26) |
removes const and/or volatile qualifiers from reflected type (function) |
(C++26)(C++26)(C++26) |
adds const and/or volatile qualifiers to reflected type (function) |
Reference modifications | |
(C++26) |
removes a reference from reflected type (function) |
(C++26)(C++26) |
adds an lvalue or rvalue reference to reflected type (function) |
Sign modifications | |
(C++26) |
returns the corresponding signed type for reflected integral type (function) |
(C++26) |
returns the corresponding unsigned type for reflected integral type (function) |
Array modifications | |
(C++26) |
removes one extent from reflected array type (function) |
(C++26) |
removes all extents from reflected array type (function) |
Pointer modifications | |
(C++26) |
removes a pointer from reflected type (function) |
(C++26) |
adds a pointer to reflected type (function) |
Other transformations | |
(C++26) |
combines meta::remove_cv and meta::remove_reference (function) |
(C++26) |
applies type transformations as when passing a function argument by value (function) |
(C++26) |
determines the common type of a sequence of reflected types (function template) |
(C++26) |
determines the common reference type of a sequence of reflected types (function template) |
(C++26) |
obtains the underlying integer type for reflected enumeration type (function) |
(C++26) |
deduces the result type of invoking a callable object with a set of arguments (function template) |
(C++26)(C++26) |
get the reference type wrapped in std::reference_wrapper (function) |
(C++26) |
obtains the size of reflected tuple (function) |
(C++26) |
obtains the type of the specified element of reflected tuple (function) |
(C++26)(C++26) |
checks if the callable object can be invoked (as if by std::invoke) with a tuple of arguments (function) |
(C++26) |
deduces the result type of invoking a callable object with a tuple of arguments (function) |
(C++26) |
obtains the size of reflected variant's list of alternatives (function) |
(C++26) |
obtains the type of reflected tuple's alternative specified by its index (function) |
(C++26) |
performs three-way comparison on reflected types (function) |
Checking string literals | |
(C++26) |
checks if a pointer points into a string literal (function) |
Synopsis
#include <compare>
#include <initializer_list>
namespace std {
// checking string literals
consteval bool is_string_literal(const char* p);
consteval bool is_string_literal(const wchar_t* p);
consteval bool is_string_literal(const char8_t* p);
consteval bool is_string_literal(const char16_t* p);
consteval bool is_string_literal(const char32_t* p);
// promoting to static storage
namespace meta {
template<ranges::input_range R> consteval info reflect_constant_string(R&& r);
template<ranges::input_range R> consteval info reflect_constant_array(R&& r);
}
template<ranges::input_range R>
consteval const ranges::range_value_t<R>* define_static_string(R&& r);
template<ranges::input_range R>
consteval span<const ranges::range_value_t<R>, /* see description */>
define_static_array(R&& r);
template<class T> consteval const remove_cvref_t<T>* define_static_object(T&& r);
}
namespace std::meta {
using info = decltype(^^::);
// class exception
class exception;
// operator representations
enum class operators
{
/* see description */;
};
using enum operators;
consteval operators operator_of(info r);
consteval string_view symbol_of(operators op);
consteval u8string_view u8symbol_of(operators op);
// reflection names and locations
consteval bool has_identifier(info r);
consteval string_view identifier_of(info r);
consteval u8string_view u8identifier_of(info r);
consteval string_view display_string_of(info r);
consteval u8string_view u8display_string_of(info r);
consteval source_location source_location_of(info r);
// reflection queries
consteval info type_of(info r);
consteval info object_of(info r);
consteval info constant_of(info r);
consteval bool is_public(info r);
consteval bool is_protected(info r);
consteval bool is_private(info r);
consteval bool is_virtual(info r);
consteval bool is_pure_virtual(info r);
consteval bool is_override(info r);
consteval bool is_final(info r);
consteval bool is_deleted(info r);
consteval bool is_defaulted(info r);
consteval bool is_user_provided(info r);
consteval bool is_user_declared(info r);
consteval bool is_explicit(info r);
consteval bool is_noexcept(info r);
consteval bool is_bit_field(info r);
consteval bool is_enumerator(info r);
consteval bool is_annotation(info r);
consteval bool is_const(info r);
consteval bool is_volatile(info r);
consteval bool is_mutable_member(info r);
consteval bool is_lvalue_reference_qualified(info r);
consteval bool is_rvalue_reference_qualified(info r);
consteval bool has_static_storage_duration(info r);
consteval bool has_thread_storage_duration(info r);
consteval bool has_automatic_storage_duration(info r);
consteval bool has_internal_linkage(info r);
consteval bool has_module_linkage(info r);
consteval bool has_external_linkage(info r);
consteval bool has_c_language_linkage(info r);
consteval bool has_linkage(info r);
consteval bool is_complete_type(info r);
consteval bool is_enumerable_type(info r);
consteval bool is_variable(info r);
consteval bool is_type(info r);
consteval bool is_namespace(info r);
consteval bool is_type_alias(info r);
consteval bool is_namespace_alias(info r);
consteval bool is_function(info r);
consteval bool is_conversion_function(info r);
consteval bool is_operator_function(info r);
consteval bool is_literal_operator(info r);
consteval bool is_special_member_function(info r);
consteval bool is_constructor(info r);
consteval bool is_default_constructor(info r);
consteval bool is_copy_constructor(info r);
consteval bool is_move_constructor(info r);
consteval bool is_assignment(info r);
consteval bool is_copy_assignment(info r);
consteval bool is_move_assignment(info r);
consteval bool is_destructor(info r);
consteval bool is_function_parameter(info r);
consteval bool is_explicit_object_parameter(info r);
consteval bool has_default_argument(info r);
consteval bool is_vararg_function(info r);
consteval bool is_template(info r);
consteval bool is_function_template(info r);
consteval bool is_variable_template(info r);
consteval bool is_class_template(info r);
consteval bool is_alias_template(info r);
consteval bool is_conversion_function_template(info r);
consteval bool is_operator_function_template(info r);
consteval bool is_literal_operator_template(info r);
consteval bool is_constructor_template(info r);
consteval bool is_concept(info r);
consteval bool is_value(info r);
consteval bool is_object(info r);
consteval bool is_structured_binding(info r);
consteval bool is_class_member(info r);
consteval bool is_namespace_member(info r);
consteval bool is_nonstatic_data_member(info r);
consteval bool is_static_member(info r);
consteval bool is_base(info r);
consteval bool has_default_member_initializer(info r);
consteval bool has_parent(info r);
consteval info parent_of(info r);
consteval info dealias(info r);
consteval bool has_template_arguments(info r);
consteval info template_of(info r);
consteval vector<info> template_arguments_of(info r);
consteval vector<info> parameters_of(info r);
consteval info variable_of(info r);
consteval info return_type_of(info r);
// access control context
struct access_context;
// member accessibility queries
consteval bool is_accessible(info r, access_context ctx);
consteval bool has_inaccessible_nonstatic_data_members(info r, access_context ctx);
consteval bool has_inaccessible_bases(info r, access_context ctx);
consteval bool has_inaccessible_subobjects(info r, access_context ctx);
// scope identification
consteval info current_function();
consteval info current_class();
consteval info current_namespace();
// reflection member queries
consteval vector<info> members_of(info r, access_context ctx);
consteval vector<info> bases_of(info type, access_context ctx);
consteval vector<info> static_data_members_of(info type, access_context ctx);
consteval vector<info> nonstatic_data_members_of(info type, access_context ctx);
consteval vector<info> subobjects_of(info type, access_context ctx);
consteval vector<info> enumerators_of(info type_enum);
// reflection layout queries
struct member_offset;
consteval member_offset offset_of(info r);
consteval size_t size_of(info r);
consteval size_t alignment_of(info r);
consteval size_t bit_size_of(info r);
// annotation reflection
consteval vector<info> annotations_of(info item);
consteval vector<info> annotations_of_with_type(info item, info type);
// value extraction
template<class T> consteval T extract(info r);
// reflection substitution
template<class R>
concept reflection_range = /* see description */;
template<reflection_range R = initializer_list<info>>
consteval bool can_substitute(info templ, R&& arguments);
template<reflection_range R = initializer_list<info>>
consteval info substitute(info templ, R&& arguments);
// expression result reflection
template<class T> consteval info reflect_constant(T expr);
template<class T> consteval info reflect_object(T& expr);
template<class T> consteval info reflect_function(T& fn);
// class definition generation
struct data_member_options;
consteval info data_member_spec(info type, data_member_options options);
consteval bool is_data_member_spec(info r);
template<reflection_range R = initializer_list<info>>
consteval info define_aggregate(info type_class, R&& mdescrs);
// primary type categories
consteval bool is_void_type(info type);
consteval bool is_null_pointer_type(info type);
consteval bool is_integral_type(info type);
consteval bool is_floating_point_type(info type);
consteval bool is_array_type(info type);
consteval bool is_pointer_type(info type);
consteval bool is_lvalue_reference_type(info type);
consteval bool is_rvalue_reference_type(info type);
consteval bool is_member_object_pointer_type(info type);
consteval bool is_member_function_pointer_type(info type);
consteval bool is_enum_type(info type);
consteval bool is_union_type(info type);
consteval bool is_class_type(info type);
consteval bool is_function_type(info type);
consteval bool is_reflection_type(info type);
// composite type categories
consteval bool is_reference_type(info type);
consteval bool is_arithmetic_type(info type);
consteval bool is_fundamental_type(info type);
consteval bool is_object_type(info type);
consteval bool is_scalar_type(info type);
consteval bool is_compound_type(info type);
consteval bool is_member_pointer_type(info type);
// type properties
consteval bool is_const_type(info type);
consteval bool is_volatile_type(info type);
consteval bool is_trivially_copyable_type(info type);
consteval bool is_standard_layout_type(info type);
consteval bool is_empty_type(info type);
consteval bool is_polymorphic_type(info type);
consteval bool is_abstract_type(info type);
consteval bool is_final_type(info type);
consteval bool is_aggregate_type(info type);
consteval bool is_structural_type(info type);
consteval bool is_signed_type(info type);
consteval bool is_unsigned_type(info type);
consteval bool is_bounded_array_type(info type);
consteval bool is_unbounded_array_type(info type);
consteval bool is_scoped_enum_type(info type);
template<reflection_range R = initializer_list<info>>
consteval bool is_constructible_type(info type, R&& type_args);
consteval bool is_default_constructible_type(info type);
consteval bool is_copy_constructible_type(info type);
consteval bool is_move_constructible_type(info type);
consteval bool is_assignable_type(info type_dst, info type_src);
consteval bool is_copy_assignable_type(info type);
consteval bool is_move_assignable_type(info type);
consteval bool is_swappable_with_type(info type1, info type2);
consteval bool is_swappable_type(info type);
consteval bool is_destructible_type(info type);
template<reflection_range R = initializer_list<info>>
consteval bool is_trivially_constructible_type(info type, R&& type_args);
consteval bool is_trivially_default_constructible_type(info type);
consteval bool is_trivially_copy_constructible_type(info type);
consteval bool is_trivially_move_constructible_type(info type);
consteval bool is_trivially_assignable_type(info type_dst, info type_src);
consteval bool is_trivially_copy_assignable_type(info type);
consteval bool is_trivially_move_assignable_type(info type);
consteval bool is_trivially_destructible_type(info type);
template<reflection_range R = initializer_list<info>>
consteval bool is_nothrow_constructible_type(info type, R&& type_args);
consteval bool is_nothrow_default_constructible_type(info type);
consteval bool is_nothrow_copy_constructible_type(info type);
consteval bool is_nothrow_move_constructible_type(info type);
consteval bool is_nothrow_assignable_type(info type_dst, info type_src);
consteval bool is_nothrow_copy_assignable_type(info type);
consteval bool is_nothrow_move_assignable_type(info type);
consteval bool is_nothrow_swappable_with_type(info type1, info type2);
consteval bool is_nothrow_swappable_type(info type);
consteval bool is_nothrow_destructible_type(info type);
consteval bool is_implicit_lifetime_type(info type);
consteval bool has_virtual_destructor(info type);
consteval bool has_unique_object_representations(info type);
consteval bool reference_constructs_from_temporary(info type_dst, info type_src);
consteval bool reference_converts_from_temporary(info type_dst, info type_src);
// type property queries
consteval size_t rank(info type);
consteval size_t extent(info type, unsigned i = 0);
// type relations
consteval bool is_same_type(info type1, info type2);
consteval bool is_base_of_type(info type_base, info type_derived);
consteval bool is_virtual_base_of_type(info type_base, info type_derived);
consteval bool is_convertible_type(info type_src, info type_dst);
consteval bool is_nothrow_convertible_type(info type_src, info type_dst);
consteval bool is_layout_compatible_type(info type1, info type2);
consteval bool is_pointer_interconvertible_base_of_type(info type_base,
info type_derived);
template<reflection_range R = initializer_list<info>>
consteval bool is_invocable_type(info type, R&& type_args);
template<reflection_range R = initializer_list<info>>
consteval bool is_invocable_r_type(info type_result, info type, R&& type_args);
template<reflection_range R = initializer_list<info>>
consteval bool is_nothrow_invocable_type(info type, R&& type_args);
template<reflection_range R = initializer_list<info>>
consteval bool is_nothrow_invocable_r_type(info type_result, info type, R&& type_args);
// const-volatile modifications
consteval info remove_const(info type);
consteval info remove_volatile(info type);
consteval info remove_cv(info type);
consteval info add_const(info type);
consteval info add_volatile(info type);
consteval info add_cv(info type);
// reference modifications
consteval info remove_reference(info type);
consteval info add_lvalue_reference(info type);
consteval info add_rvalue_reference(info type);
// sign modifications
consteval info make_signed(info type);
consteval info make_unsigned(info type);
// array modifications
consteval info remove_extent(info type);
consteval info remove_all_extents(info type);
// pointer modifications
consteval info remove_pointer(info type);
consteval info add_pointer(info type);
// other transformations
consteval info remove_cvref(info type);
consteval info decay(info type);
template<reflection_range R = initializer_list<info>>
consteval info common_type(R&& type_args);
template<reflection_range R = initializer_list<info>>
consteval info common_reference(R&& type_args);
consteval info underlying_type(info type);
template<reflection_range R = initializer_list<info>>
consteval info invoke_result(info type, R&& type_args);
consteval info unwrap_reference(info type);
consteval info unwrap_ref_decay(info type);
consteval size_t tuple_size(info type);
consteval info tuple_element(size_t index, info type);
consteval bool is_applicable_type(info fn, info tuple);
consteval bool is_nothrow_applicable_type(info fn, info tuple);
consteval info apply_result(info fn, info tuple);
consteval size_t variant_size(info type);
consteval info variant_alternative(size_t index, info type);
consteval strong_ordering type_order(info type_a, info type_b);
}
Class std::meta::exception
namespace std::meta {
class exception : public std::exception
{
private:
optional<string> /*what_*/; // exposition-only
u8string /*u8what_*/; // exposition-only
info /*from_*/; // exposition-only
source_location /*where_*/; // exposition-only
public:
consteval exception(u8string_view what,
info from,
source_location where = source_location::current()) noexcept;
consteval exception(string_view what,
info from,
source_location where = source_location::current()) noexcept;
exception(const exception&) = default;
exception(exception&&) = default;
exception& operator=(const exception&) = default;
exception& operator=(exception&&) = default;
constexpr const char* what() const noexcept override;
consteval u8string_view u8what() const noexcept;
consteval info from() const noexcept;
consteval source_location where() const noexcept;
};
}
Class std::meta::access_context
namespace std::meta {
struct access_context
{
access_context() = delete;
consteval info scope() const;
consteval info designating_class() const;
static consteval access_context current() noexcept;
static consteval access_context unprivileged() noexcept;
static consteval access_context unchecked() noexcept;
consteval access_context via(info cls) const;
};
}
Class std::meta::member_offset
namespace std::meta {
struct member_offset
{
ptrdiff_t bytes;
ptrdiff_t bits;
constexpr ptrdiff_t total_bits() const;
auto operator<=>(const member_offset&) const = default;
};
}
Class std::meta::data_member_options
namespace std::meta {
struct data_member_options
{
struct /*name-type*/
{ // exposition-only
template<class T>
requires constructible_from<u8string, T>
consteval /*name-type*/(T&&);
template<class T>
requires constructible_from<string, T>
consteval /*name-type*/(T&&);
private:
variant<u8string, string> /*contents*/; // exposition-only
};
optional</*name-type*/> name;
optional<int> alignment;
optional<int> bit_width;
bool no_unique_address = false;
vector<info> annotations;
};
}