◐ Shell
clean mode source ↗

Reflection library (since C++26) - cppreference.com

The facilities defined in this section support reflective programming, allowing C++ programs to both observe the structure of the program itself and to generate code that depends on those observations.

the type of reflection values
(typedef) [edit] exception thrown by reflection functions
(class) [edit]
Promoting compile-time storage into static storage
promotes a compile-time string to static storage, returning a reflection representing the static string
(function template) [edit] promotes compile-time array into static storage, returning a reflection representing the static array
(function template) [edit] promotes compile-time string to static storage, returning a pointer to the first character of the static string
(function template) [edit] promotes compile-time array into static storage, returning a span of the static array
(function template) [edit] promotes compile-time value into static storage, returning a pointer to the static object
(function template) [edit]
Operator representations
identifies overloadable operators
(enum) [edit] identifies the operator represented by the reflection
(function) [edit] converts a meta::operators enumerator to its symbolic name
(function) [edit]
Reflection names and locations
checks if reflection represents an entity that has an identifier
(function) [edit] if the reflected entity has an identifier, obtains its name
(function) [edit] obtains a string suitable for identifying the reflected entity
(function) [edit] obtains the source location of the reflected entity
(function) [edit]
Reflection queries
obtains a reflection of the type of the reflected entity
(function) [edit] obtains a reflection of the object of the reflected variable
(function) [edit] obtains a reflection of the constant value of the reflected entity
(function) [edit] checks if reflection represents a public, protected, or private member or base class
(function) [edit] checks if reflection represents a virtual member function or virtual base class
(function) [edit] checks if reflection represents a pure virtual member function
(function) [edit] checks if reflection represents a member function that overrides another member function
(function) [edit] checks if reflection represents a final class or final member function
(function) [edit] checks if reflection represents a deleted function
(function) [edit] checks if reflection represents a defaulted function
(function) [edit] checks if reflection represents a user-provided function
(function) [edit] checks if reflection represents a user-declared function
(function) [edit] checks if reflection represents a member function that is declared explicit
(function) [edit] checks if reflection represents a noexcept function or function type
(function) [edit] checks if reflection represents a bit-field or a data member description of bit-field
(function) [edit] checks if reflection represents an enumerator
(function) [edit] checks if reflection represents an annotation
(function) [edit] checks if reflection represents a const type or a function type with const qualifier
(function) [edit] checks if reflection represents a volatile type or a function type with volatile qualifier
(function) [edit] checks if reflection represents a mutable non-static data member
(function) [edit] checks if the reflected entity has a storage duration
(function) [edit] checks if the reflected entity has a linkage
(function) [edit] checks if the reflected entity has "C" language linkage (extern "C")
(function) [edit] checks if reflection represents a complete type
(function) [edit] checks if the reflected type has its list of members completely defined
(function) [edit] checks if reflection represents a variable
(function) [edit] checks if reflection represents a type
(function) [edit] checks if reflection represents a namespace
(function) [edit] checks if reflection represents a type alias
(function) [edit] checks if reflection represents a namespace alias
(function) [edit] checks if reflection represents a function
(function) [edit] checks if reflection represents a special member function
(function) [edit] checks if reflection represents a function parameter
(function) [edit] checks if reflection represents an explicit object parameter
(function) [edit] checks if reflected function parameter has a default argument
(function) [edit] checks if reflection represents a function or function type with an ellipsis parameter
(function) [edit] checks if reflection represents a (scalar) value
(function) [edit] checks if reflection represents a static object
(function) [edit] checks if reflection represents a structured binding
(function) [edit] checks if reflection represents a class member
(function) [edit] checks if reflection represents a namespace member
(function) [edit] checks if reflection represents a non-static data member
(function) [edit] checks if reflection represents a static class member
(function) [edit] checks if reflection represents a direct base class relationship
(function) [edit] checks if reflected non-static data member has a default member initializer
(function) [edit] checks if the reflected entity is contained in a scope
(function) [edit] obtains the scope that contains the reflected entity
(function) [edit] obtains a reflection of the underlying entity of the reflected type/namespace alias
(function) [edit] checks if reflected entity is produced by substituting template arguments into a template
(function) [edit] obtains a reflection of the template used to instantiate the reflected entity
(function) [edit] obtains the template arguments of the reflected entity
(function) [edit] obtains the parameters of the reflected function
(function) [edit] obtains the variable of the reflected function parameter in the function definition
(function) [edit] obtains the return type of the reflected function
(function) [edit]
Accessibility queries
represents a context for access checking
(class) [edit] checks if a member is accessible in a given context
(function) [edit] checks if the reflected class has any inaccessible non-static data members
(function) [edit] checks if the reflected class has any inaccessible direct base classes
(function) [edit] checks if the reflected class has any inaccessible non-static data members or direct base classes
(function) [edit]
Scope identification
returns a reflection of the enclosing function
(function) [edit] returns a reflection of the enclosing class
(function) [edit] returns a reflection of the enclosing namespace
(function) [edit]
Reflection member queries
obtains the accessible direct members of the reflected class or namespace
(function) [edit] obtains the accessible direct bases of the reflected class
(function) [edit] obtains the accessible static data members of the reflected class
(function) [edit] obtains the accessible non-static data members of the reflected class
(function) [edit] obtains the accessible base class subobjects and non-static data members of the reflected class
(function) [edit] obtains the enumerators of the reflected enum type
(function) [edit]
Reflection layout queries
returns the offset of a (member or base) subobject relative to its enclosing class
(function) [edit] returns the size in bytes of the reflected object or type
(function) [edit] returns the alignment of the reflected object or type
(function) [edit] returns the size in bits of the reflected object or type
(function) [edit]
Annotation reflection
obtains the annotations applying to the reflected entity
(function) [edit] obtains the annotations that apply to the reflected entity and have the specified type
(function) [edit]
extracts the value of the reflected entity
(function template) [edit]
Reflection substitution
specifies a range of reflection values
(concept) [edit] checks whether the reflected arguments can be substituted in the reflected template
(function template) [edit] obtains a reflection of the result of substituting reflected arguments in the reflected template
(function template) [edit]
Expression result reflection
returns a reflection representing a value or template parameter object, suitable for use as a constant template argument
(function template) [edit] returns a reflection representing an object, suitable for use as a constant template argument
(function template) [edit] returns a reflection representing a function, suitable for use as a constant template argument
(function template) [edit]
Class definition generation
creates a data member description for use with injected declarations
(function) [edit] checks if reflection represents a data member description
(function) [edit] defines an aggregate type from a sequence of data member descriptions
(function template) [edit]
Primary type categories
Composite type categories
Type properties
Type property queries
Type relations
Const-volatile modifications
Reference modifications
Sign modifications
Array modifications
Pointer modifications
Other transformations
Checking string literals
checks if a pointer points into a string literal
(function) [edit]