Difference between revisions of "cpp/header/experimental/reflect"
From cppreference.com
< cpp | header | experimental
(Created page with "[https://en.cppreference.com/w/cpp/keyword/reflexpr#Reflection_TS <nowiki><experimental/reflect></nowiki>]") |
m (~an) |
||
(11 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
− | [ | + | {{cpp/header/experimental/title|experimental/reflect}} |
− | < | + | {{cpp/header/experimental/navbar}} |
+ | |||
+ | This header is part of the [[cpp/experimental/reflect|Reflection TS]]. | ||
+ | |||
+ | {{dsc begin}} | ||
+ | {{dsc namespace | std::experimental::reflect}} | ||
+ | {{dsc namespace | inline=true | std::experimental::reflect::v1}} | ||
+ | |||
+ | {{dsc h1 | Concepts}} | ||
+ | {{dsc concept | cpp/experimental/reflect/Object | notes={{mark since reflection ts}} | specifies that a type is a meta-object type}} | ||
+ | {{dsc concept | cpp/experimental/reflect/ObjectSequence | notes={{mark since reflection ts}} | specifies that a meta-object type is a meta-object sequence type}} | ||
+ | {{dsc concept | cpp/experimental/reflect/TemplateParameterScope | notes={{mark since reflection ts}} | specifies that a meta-object type reflects a template parameter scope}} | ||
+ | {{dsc concept | cpp/experimental/reflect/Named | notes={{mark since reflection ts}} | specifies that a meta-object type reflects an entity or alias with an associated (possibly empty) name}} | ||
+ | {{dsc concept | cpp/experimental/reflect/Alias | notes={{mark since reflection ts}} | specifies that a meta-object type reflects a type alias, namespace alias, or an alias introduced by a using-declaration}} | ||
+ | {{dsc concept | cpp/experimental/reflect/RecordMember | notes={{mark since reflection ts}} | specifies that a meta-object type reflects a {{spar|member-declaration}} of a class}} | ||
+ | {{dsc concept | cpp/experimental/reflect/Enumerator | notes={{mark since reflection ts}} | specifies that a meta-object type reflects an enumerator}} | ||
+ | {{dsc concept | cpp/experimental/reflect/Variable | notes={{mark since reflection ts}} | specifies that a meta-object type reflects a variable or data member}} | ||
+ | {{dsc concept | cpp/experimental/reflect/ScopeMember | notes={{mark since reflection ts}} | specifies that a meta-object type satisfies {{tt|RecordMember}}, {{tt|Enumerator}}, or {{tt|Variable}}, or reflects a namespace other than the global namespace}} | ||
+ | {{dsc concept | cpp/experimental/reflect/Typed | notes={{mark since reflection ts}} | specifies that a meta-object type reflects an entity with a type}} | ||
+ | {{dsc concept | cpp/experimental/reflect/Namespace | notes={{mark since reflection ts}} | specifies that a meta-object type reflects a namespace}} | ||
+ | {{dsc concept | cpp/experimental/reflect/GlobalScope | notes={{mark since reflection ts}} | specifies that a meta-object type reflects the global namespace}} | ||
+ | {{dsc concept | cpp/experimental/reflect/Class | notes={{mark since reflection ts}} | specifies that a meta-object type reflects a non-union class type}} | ||
+ | {{dsc concept | cpp/experimental/reflect/Enum | notes={{mark since reflection ts}} | specifies that a meta-object type reflects an enumeration type}} | ||
+ | {{dsc concept | cpp/experimental/reflect/Record | notes={{mark since reflection ts}} | specifies that a meta-object type reflects a class type}} | ||
+ | {{dsc concept | cpp/experimental/reflect/Scope | notes={{mark since reflection ts}} | specifies that a meta-object type reflects a namespace, class, enumeration, function, closure type, a template parameter scope}} | ||
+ | {{dsc concept | cpp/experimental/reflect/Type | notes={{mark since reflection ts}} | specifies that a meta-object type reflects a type}} | ||
+ | {{dsc concept | cpp/experimental/reflect/Constant | notes={{mark since reflection ts}} | specifies that a meta-object type reflects an enumerator or a constexpr variable}} | ||
+ | {{dsc concept | cpp/experimental/reflect/Base | notes={{mark since reflection ts}} | specifies that a meta-object type reflects a direct base class obtained from {{tt|get_base_classes}} }} | ||
+ | {{dsc concept | cpp/experimental/reflect/FunctionParameter | notes={{mark since reflection ts}} | specifies that a meta-object type reflects a function parameter}} | ||
+ | {{dsc concept | cpp/experimental/reflect/Callable | notes={{mark since reflection ts}} | specifies that a meta-object type reflects a function (including constructors and destructors)}} | ||
+ | {{dsc concept | cpp/experimental/reflect/Expression | notes={{mark since reflection ts}} | specifies that a meta-object type reflects an expression}} | ||
+ | {{dsc concept | cpp/experimental/reflect/ParenthesizedExpression | notes={{mark since reflection ts}} | specifies that a meta-object type reflects a parenthesized expression}} | ||
+ | {{dsc concept | cpp/experimental/reflect/FunctionCallExpression | notes={{mark since reflection ts}} | specifies that a meta-object type reflects a {{spar|function-call-expression}}}} | ||
+ | {{dsc concept | cpp/experimental/reflect/FunctionalTypeConversion | notes={{mark since reflection ts}} | specifies that a meta-object type reflects a {{spar|functional-type-conv-expression}}}} | ||
+ | {{dsc concept | cpp/experimental/reflect/Function | notes={{mark since reflection ts}} | specifies that a meta-object type reflects a function (excluding constructors and destructors)}} | ||
+ | {{dsc concept | cpp/experimental/reflect/MemberFunction | notes={{mark since reflection ts}} | specifies that a meta-object type reflects a member function (excluding constructors and destructors)}} | ||
+ | {{dsc concept | cpp/experimental/reflect/SpecialMemberFunction | notes={{mark since reflection ts}} | specifies that a meta-object type reflects a special member function}} | ||
+ | {{dsc concept | cpp/experimental/reflect/Constructor | notes={{mark since reflection ts}} | specifies that a meta-object type reflects a constructor}} | ||
+ | {{dsc concept | cpp/experimental/reflect/Destructor | notes={{mark since reflection ts}} | specifies that a meta-object type reflects a destructor}} | ||
+ | {{dsc concept | cpp/experimental/reflect/Operator | notes={{mark since reflection ts}} | specifies that a meta-object type reflects an operator function or a conversion function}} | ||
+ | {{dsc concept | cpp/experimental/reflect/ConversionOperator | notes={{mark since reflection ts}} | specifies that a meta-object type reflects a conversion function}} | ||
+ | {{dsc concept | cpp/experimental/reflect/Lambda | notes={{mark since reflection ts}} | specifies that a meta-object type reflects the closure type of a non-generic lambda}} | ||
+ | {{dsc concept | cpp/experimental/reflect/LambdaCapture | notes={{mark since reflection ts}} | specifies that a meta-object type reflects a lambda capture}} | ||
+ | |||
+ | {{dsc h1 | Classes}} | ||
+ | |||
+ | {{dsc h2 | {{tt|Object}} operations}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/reflects_same | notes={{mark since reflection ts}} | checks if two meta-object types reflect the same entity or alias}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_source_line | notes={{mark since reflection ts}} | obtains the presumed line number of the declaration of the reflected entity or alias}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_source_column | notes={{mark since reflection ts}} | obtains the implementation-defined column number of the declaration of the reflected entity or alias}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_source_file_name | notes={{mark since reflection ts}} | obtains the presumed file name of the declaration of the reflected entity or alias}} | ||
+ | |||
+ | {{dsc h2 | {{tt|ObjectSequence}} operations}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_size | notes={{mark since reflection ts}} | obtains the size of a meta-object sequence}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_element | notes={{mark since reflection ts}} | obtains the meta-object type with specified index in a sequence}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/unpack_sequence | notes={{mark since reflection ts}} | applies a template to the meta-object sequence}} | ||
+ | |||
+ | {{dsc h2 | {{tt|Named}} operations}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/is_unnamed | notes={{mark since reflection ts}} | checks if the reflected entity or alias is named}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_name | notes={{mark since reflection ts}} | obtains the unqualified name of the reflected entity or alias}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_display_name | notes={{mark since reflection ts}} | obtains the implementation-defined display name of the reflected entity or alias}} | ||
+ | |||
+ | {{dsc h2 | {{tt|Alias}} operations}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_alias | notes={{mark since reflection ts}} | obtains the meta-object type reflecting the associated entity of the reflected alias}} | ||
+ | |||
+ | {{dsc h2 | {{tt|Type}} operations}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_type | notes={{mark since reflection ts}} | obtains the meta-object type reflecting the type of the reflected entity or alias}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_reflected_type | notes={{mark since reflection ts}} | obtains the type of the reflected entity or alias}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/is_enum | notes={{mark since reflection ts}} | checks if the meta-object type reflects an enumeration type}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/is_union | notes={{mark since reflection ts}} | checks if the meta-object type reflects a union type}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/uses_key | title=uses_class_key<br>uses_struct_key | notes={{mark since reflection ts}} | checks if the meta-object type reflects a non-union class type whose declaration uses {{c|class}} or {{c|struct}} respectively}} | ||
+ | |||
+ | {{dsc h2 | {{tt|ScopeMember}} operations}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_scope | notes={{mark since reflection ts}} | obtains the meta-object type reflecting the scope of the reflected entity or alias}} | ||
+ | |||
+ | {{dsc h2 | {{tt|Base}} operations}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_class | notes={{mark since reflection ts}} | obtains the meta-object type reflecting the base class in the given base class relationship}} | ||
+ | |||
+ | {{dsc h2 | {{tt|RecordMember}} and {{tt|Base}} operations}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/is_public | notes={{mark since reflection ts}} | checks if the reflected member or base class is public}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/is_protected | notes={{mark since reflection ts}} | checks if the reflected member or base class is protected}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/is_private | notes={{mark since reflection ts}} | checks if the reflected member or base class is private}} | ||
+ | |||
+ | {{dsc h2 | {{tt|Record}} operations}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_data_members | title=get_public_data_members<br>get_accessible_data_members<br>get_data_members | notes={{mark since reflection ts}} | obtains a meta-object sequence type whose elements reflect public, accessible, or all data members of the reflected class}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_member_functions | title=get_public_member_functions<br>get_accessible_member_functions<br>get_member_functions | notes={{mark since reflection ts}} | obtains a meta-object sequence type whose elements reflect public, accessible, or all member functions of the reflected class}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_constructors | notes={{mark since reflection ts}} | obtains a meta-object sequence type whose elements reflect all constructors of the reflected class}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_operators | notes={{mark since reflection ts}} | obtains a meta-object sequence type whose elements reflect all operator functions and conversion functions declared in the reflected class}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_destructor | notes={{mark since reflection ts}} | obtains the meta-object type reflecting the destructor of the reflected class}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_member_types | title=get_public_member_types<br>get_accessible_member_types<br>get_member_types | notes={{mark since reflection ts}} | obtains a meta-object sequence type whose elements reflect public, accessible, or all nested type or member typedefs of the reflected class}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_base_classes | title=get_public_base_classes<br>get_accessible_base_classes<br>get_base_classes | notes={{mark since reflection ts}} | obtains a meta-object sequence type whose elements reflect public, accessible, or all base classes of the reflected class}} | ||
+ | |||
+ | {{dsc h2 | {{tt|Enum}} operations}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/is_scoped_enum | notes={{mark since reflection ts}} | checks whether the reflected enumeration is scoped}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_enumerators | notes={{mark since reflection ts}} | obtains a meta-object sequence type whose elements reflects the enumerators of the reflected enumeration}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_underlying_type | notes={{mark since reflection ts}} | obtains the meta-object type reflecting the underlying type of the reflected enumeration}} | ||
+ | |||
+ | {{dsc h2 | {{tt|Variable}} operations}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_constant | notes={{mark since reflection ts}} | obtains the value of the reflected variable which is a constant expression}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/is_thread_local | notes={{mark since reflection ts}} | checks if the variable is declared with {{c|thread_local}} }} | ||
+ | |||
+ | {{dsc h2 | {{tt|FunctionParameter}} operations}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/has_default_argument | notes={{mark since reflection ts}} | checks whether the reflected parameter has a default argument}} | ||
+ | |||
+ | {{dsc h2 | {{tt|Callable}} operations}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_parameters | notes={{mark since reflection ts}} | obtains a meta-object sequence type whose elements reflects the parameters of the reflected function}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/is_vararg | notes={{mark since reflection ts}} | checks whether the parameter list of the reflected function contains an ellipsis parameter}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/is_noexcept | notes={{mark since reflection ts}} | checks whether the reflected function is non-throwing}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/is_deleted | notes={{mark since reflection ts}} | checks whether the reflected function is deleted}} | ||
+ | |||
+ | {{dsc h2 | {{tt|Variable}} and {{tt|Callable}} operations}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/is_constexpr | notes={{mark since reflection ts}} | checks if the reflected variable or function is constexpr}} | ||
+ | |||
+ | {{dsc h2 | {{tt|Namespace}} and {{tt|Callable}} operations}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/is_inline | notes={{mark since reflection ts}} | checks whether the reflected namespace or function is inline}} | ||
+ | |||
+ | {{dsc h2 | {{tt|ParenthesizedExpression}} operations}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_subexpression | notes={{mark since reflection ts}} | obtains the meta-object type reflecting the unparenthesized expression of the reflected parethesized expression}} | ||
+ | |||
+ | {{dsc h2 | {{tt|FunctionCallExpression}} operations}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_callable | notes={{mark since reflection ts}} | obtains the meta-object type reflecting the function in the reflected {{spar|function-call-expression}} }} | ||
+ | |||
+ | {{dsc h2 | {{tt|FunctionalTypeConversion}} operations}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_constructor | notes={{mark since reflection ts}} | obtains the meta-object type reflecting the constructor in reflected {{spar|functional-type-conv-expression}} }} | ||
+ | |||
+ | {{dsc h2 | {{tt|Variable}} and {{tt|Function}} operations}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_pointer | notes={{mark since reflection ts}} | get the address of the reflected variable or function, or the pointer-to-member value to the reflected non-static member}} | ||
+ | |||
+ | {{dsc h2 | {{tt|MemberFunction}} operations}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/is_qualified | title=is_const<br>is_volatile<br>has_lvalueref_qualifier<br>has_rvalueref_qualifier | notes={{mark since reflection ts}} | checks if the reflected member function is declared with {{c|const}}, {{c|volatile}}, {{c|&}}, or {{c|&&}} qualifier respectively}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/is_override | notes={{mark since reflection ts}} | checks if the reflected member function overrides a member function of base class}} | ||
+ | |||
+ | {{dsc h2 | {{tt|Record}} and {{tt|MemberFunction}} operations}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/is_final | notes={{mark since reflection ts}} | checks if the reflected class or member function is marked with {{c|final}} }} | ||
+ | |||
+ | {{dsc h2 | {{tt|Variable}} and {{tt|MemberFunction}} operations}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/is_static | notes={{mark since reflection ts}} | checks if the reflected variable is of static storage duration, or the reflected member function is static}} | ||
+ | |||
+ | {{dsc h2 | {{tt|SpecialMemberFunction}} operations}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/is_implicitly_declared | notes={{mark since reflection ts}} | checks if the reflected special member function is implicitly declared}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/is_defaulted | notes={{mark since reflection ts}} | checks if the reflected special member function is defaulted in its first declaration}} | ||
+ | |||
+ | {{dsc h2 | {{tt|Constructor}} and {{tt|ConversionOperator}} operations}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/is_explicit | notes={{mark since reflection ts}} | checks if the reflected constructor or conversion function is declared with {{c|explicit}} }} | ||
+ | |||
+ | {{dsc h2 | {{tt|MemberFunction}} and {{tt|Destructor}} operations}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/is_virtual | notes={{mark since reflection ts}} | checks if the reflected member function is virtual}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/is_pure_virtual | notes={{mark since reflection ts}} | checks if the reflected member function is pure virtual}} | ||
+ | |||
+ | {{dsc h2 | {{tt|Lambda}} operations}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/get_captures | notes={{mark since reflection ts}} | obtains a meta-object sequence type whose elements reflect the captures of the reflected closure type}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/uses_default_capture | title=uses_default_copy_capture<br>uses_default_reference_capture | notes={{mark since reflection ts}} | checks if the capture-default of the lambda expression of the reflected closure type is {{tt|1==}} or {{tt|&}} respectively}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/is_call_operator_const | notes={{mark since reflection ts}} | checks if the {{tt|operator()}} of the reflected closure type is declared with {{c|const}} }} | ||
+ | |||
+ | {{dsc h2 | {{tt|LambdaCapture}} operations}} | ||
+ | {{dsc tclass | cpp/experimental/reflect/is_explictly_captured | notes={{mark since reflection ts}} | checks if the reflected lambda capture is explicitly captured }} | ||
+ | {{dsc tclass | cpp/experimental/reflect/is_init_capture | notes={{mark since reflection ts}} | checks if the reflected lambda capture is an init-capture}} | ||
+ | {{dsc end}} | ||
+ | |||
+ | ===Synopsis=== | ||
+ | {{source|1= | ||
+ | namespace std::experimental::reflect { | ||
+ | inline namespace v1 { | ||
+ | |||
+ | // 21.12.3 Concepts for meta-object types | ||
+ | template <class T> | ||
+ | concept Object = /* see description */; | ||
+ | template <class T> | ||
+ | concept ObjectSequence = /* see description */; // refines Object | ||
+ | template <class T> | ||
+ | concept TemplateParameterScope = /* see description */; // refines Scope | ||
+ | template <class T> | ||
+ | concept Named = /* see description */; // refines Object | ||
+ | template <class T> | ||
+ | concept Alias = /* see description */; // refines Named and ScopeMember | ||
+ | template <class T> | ||
+ | concept RecordMember = /* see description */; // refines ScopeMember | ||
+ | template <class T> | ||
+ | concept Enumerator = /* see description */; // refines Constant | ||
+ | template <class T> | ||
+ | concept Variable = /* see description */; // refines Typed and ScopeMember | ||
+ | template <class T> | ||
+ | concept ScopeMember = /* see description */; // refines Named | ||
+ | template <class T> | ||
+ | concept Typed = /* see description */; // refines Object | ||
+ | template <class T> | ||
+ | concept Namespace = /* see description */; // refines Named and Scope | ||
+ | template <class T> | ||
+ | concept GlobalScope = /* see description */; // refines Namespace | ||
+ | template <class T> | ||
+ | concept Class = /* see description */; // refines Record | ||
+ | template <class T> | ||
+ | concept Enum = /* see description */; // refines Type, Scope, and ScopeMember | ||
+ | template <class T> | ||
+ | concept Record = /* see description */; // refines Type, Scope, and ScopeMember | ||
+ | template <class T> | ||
+ | concept Scope = /* see description */; // refines Object | ||
+ | template <class T> | ||
+ | concept Type = /* see description */; // refines Named | ||
+ | template <class T> | ||
+ | concept Constant = /* see description */; // refines Typed and ScopeMember | ||
+ | template <class T> | ||
+ | concept Base = /* see description */; // refines Object | ||
+ | template <class T> | ||
+ | concept FunctionParameter = /* see description */; // refines Typed and ScopeMember | ||
+ | template <class T> | ||
+ | concept Callable = /* see description */; // refines Scope and ScopeMember | ||
+ | template <class T> | ||
+ | concept Expression = /* see description */; // refines Object | ||
+ | template <class T> | ||
+ | concept ParenthesizedExpression = /* see description */; // refines Expression | ||
+ | template <class T> | ||
+ | concept FunctionCallExpression = /* see description */; // refines Expression | ||
+ | template <class T> | ||
+ | concept FunctionalTypeConversion = /* see description */; // refines Expression | ||
+ | template <class T> | ||
+ | concept Function = /* see description */; // refines Typed and Callable | ||
+ | template <class T> | ||
+ | concept MemberFunction = /* see description */; // refines RecordMember and Function | ||
+ | template <class T> | ||
+ | concept SpecialMemberFunction = /* see description */; // refines RecordMember | ||
+ | template <class T> | ||
+ | concept Constructor = /* see description */; // refines Callable and RecordMember | ||
+ | template <class T> | ||
+ | concept Destructor = /* see description */; // refines Callable and SpecialMemberFunction | ||
+ | template <class T> | ||
+ | concept Operator = /* see description */; // refines Function | ||
+ | template <class T> | ||
+ | concept ConversionOperator = /* see description */; // refines MemberFunction and Operator | ||
+ | template <class T> | ||
+ | concept Lambda = /* see description */; // refines Type and Scope | ||
+ | template <class T> | ||
+ | concept LambdaCapture = /* see description */; // refines Variable | ||
+ | |||
+ | // 21.12.4 Meta-object operations | ||
+ | // Multi-concept operations | ||
+ | template <Object T> struct is_public; | ||
+ | template <Object T> struct is_protected; | ||
+ | template <Object T> struct is_private; | ||
+ | template <Object T> struct is_constexpr; | ||
+ | template <Object T> struct is_static; | ||
+ | template <Object T> struct is_final; | ||
+ | template <Object T> struct is_explicit; | ||
+ | template <Object T> struct is_inline; | ||
+ | template <Object T> struct is_virtual; | ||
+ | template <Object T> struct is_pure_virtual; | ||
+ | template <Object T> struct get_pointer; | ||
+ | |||
+ | template <class T> | ||
+ | requires RecordMember<T> {{!!}} Base<T> | ||
+ | constexpr auto is_public_v = is_public<T>::value; | ||
+ | template <class T> | ||
+ | requires RecordMember<T> {{!!}} Base<T> | ||
+ | constexpr auto is_protected_v = is_protected<T>::value; | ||
+ | template <class T> | ||
+ | requires RecordMember<T> {{!!}} Base<T> | ||
+ | constexpr auto is_private_v = is_private<T>::value; | ||
+ | template <class T> | ||
+ | requires Variable<T> {{!!}} Callable<T> | ||
+ | constexpr auto is_constexpr_v = is_constexpr<T>::value; | ||
+ | template <class T> | ||
+ | requires Variable<T> {{!!}} MemberFunction<T> | ||
+ | constexpr auto is_static_v = is_static<T>::value; | ||
+ | template <class T> | ||
+ | requires Class<T> {{!!}} MemberFunction<T> | ||
+ | constexpr auto is_final_v = is_final<T>::value; | ||
+ | template <class T> | ||
+ | requires Constructor<T> {{!!}} ConversionOperator<T> | ||
+ | constexpr auto is_explicit_v = is_explicit<T>::value; | ||
+ | template <class T> | ||
+ | requires Namespace<T> {{!!}} Callable<T> | ||
+ | constexpr auto is_inline_v = is_inline<T>::value; | ||
+ | template <class T> | ||
+ | requires Base<T> {{!!}} MemberFunction<T> {{!!}} Destructor<T> | ||
+ | constexpr auto is_virtual_v = is_virtual<T>::value; | ||
+ | template <class T> | ||
+ | requires MemberFunction<T> {{!!}} Destructor<T> | ||
+ | constexpr auto is_pure_virtual_v = is_pure_virtual<T>::value; | ||
+ | template <class T> | ||
+ | requires Variable<T> {{!!}} Function<T> | ||
+ | constexpr auto get_pointer_v = get_pointer<T>::value; | ||
+ | |||
+ | // 21.12.4.1 Object operations | ||
+ | template <Object T1, Object T2> struct reflects_same; | ||
+ | template <Object T> struct get_source_line; | ||
+ | template <Object T> struct get_source_column; | ||
+ | template <Object T> struct get_source_file_name; | ||
+ | |||
+ | template <Object T1, Object T2> | ||
+ | constexpr auto reflects_same_v = reflects_same<T1, T2>::value; | ||
+ | template <class T> | ||
+ | constexpr auto get_source_line_v = get_source_line<T>::value; | ||
+ | template <class T> | ||
+ | constexpr auto get_source_column_v = get_source_column<T>::value; | ||
+ | template <class T> | ||
+ | constexpr auto get_source_file_name_v = get_source_file_name<T>::value; | ||
+ | |||
+ | // 21.12.4.2 ObjectSequence operations | ||
+ | template <ObjectSequence T> struct get_size; | ||
+ | template <size_t I, ObjectSequence T> struct get_element; | ||
+ | template <template <class...> class Tpl, ObjectSequence T> | ||
+ | struct unpack_sequence; | ||
+ | |||
+ | template <ObjectSequence T> | ||
+ | constexpr auto get_size_v = get_size<T>::value; | ||
+ | template <size_t I, ObjectSequence T> | ||
+ | using get_element_t = typename get_element<I, T>::type; | ||
+ | template <template <class...> class Tpl, ObjectSequence T> | ||
+ | using unpack_sequence_t = typename unpack_sequence<Tpl, T>::type; | ||
+ | |||
+ | // 21.12.4.3 Named operations | ||
+ | template <Named T> struct is_unnamed; | ||
+ | template <Named T> struct get_name; | ||
+ | template <Named T> struct get_display_name; | ||
+ | |||
+ | template <Named T> | ||
+ | constexpr auto is_unnamed_v = is_unnamed<T>::value; | ||
+ | template <Named T> | ||
+ | constexpr auto get_name_v = get_name<T>::value; | ||
+ | template <Named T> | ||
+ | constexpr auto get_display_name_v = get_display_name<T>::value; | ||
+ | |||
+ | // 21.12.4.4 Alias operations | ||
+ | template <Alias T> struct get_aliased; | ||
+ | |||
+ | template <Alias T> | ||
+ | using get_aliased_t = typename get_aliased<T>::type; | ||
+ | |||
+ | // 21.12.4.5 Type operations | ||
+ | template <Typed T> struct get_type; | ||
+ | template <Type T> struct get_reflected_type; | ||
+ | template <Type T> struct is_enum; | ||
+ | template <Class T> struct uses_class_key; | ||
+ | template <Class T> struct uses_struct_key; | ||
+ | template <Type T> struct is_union; | ||
+ | |||
+ | template <Typed T> | ||
+ | using get_type_t = typename get_type<T>::type; | ||
+ | template <Type T> | ||
+ | using get_reflected_type_t = typename get_reflected_type<T>::type; | ||
+ | template <Type T> | ||
+ | constexpr auto is_enum_v = is_enum<T>::value; | ||
+ | template <Class T> | ||
+ | constexpr auto uses_class_key_v = uses_class_key<T>::value; | ||
+ | template <Class T> | ||
+ | constexpr auto uses_struct_key_v = uses_struct_key<T>::value; | ||
+ | template <Type T> | ||
+ | constexpr auto is_union_v = is_union<T>::value; | ||
+ | |||
+ | // 21.12.4.6 Member operations | ||
+ | template <ScopeMember T> struct get_scope; | ||
+ | template <RecordMember T> struct is_public<T>; | ||
+ | template <RecordMember T> struct is_protected<T>; | ||
+ | template <RecordMember T> struct is_private<T>; | ||
+ | template <ScopeMember T> | ||
+ | using get_scope_t = typename get_scope<T>::type; | ||
+ | |||
+ | // 21.12.4.7 Record operations | ||
+ | template <Record T> struct get_public_data_members; | ||
+ | template <Record T> struct get_accessible_data_members; | ||
+ | template <Record T> struct get_data_members; | ||
+ | template <Record T> struct get_public_member_functions; | ||
+ | template <Record T> struct get_accessible_member_functions; | ||
+ | template <Record T> struct get_member_functions; | ||
+ | template <Record T> struct get_public_member_types; | ||
+ | template <Record T> struct get_accessible_member_types; | ||
+ | template <Record T> struct get_member_types; | ||
+ | template <Record T> struct get_constructors; | ||
+ | template <Record T> struct get_destructor; | ||
+ | template <Record T> struct get_operators; | ||
+ | template <Class T> struct get_public_base_classes; | ||
+ | template <Class T> struct get_accessible_base_classes; | ||
+ | template <Class T> struct get_base_classes; | ||
+ | template <Class T> struct is_final<T>; | ||
+ | |||
+ | template <Record T> | ||
+ | using get_public_data_members_t = typename get_public_data_members<T>::type; | ||
+ | template <Record T> | ||
+ | using get_accessible_data_members_t = typename get_accessible_data_members<T>::type; | ||
+ | template <Record T> | ||
+ | using get_data_members_t = typename get_data_members<T>::type; | ||
+ | template <Record T> | ||
+ | using get_public_member_functions_t = typename get_public_member_functions<T>::type; | ||
+ | template <Record T> | ||
+ | using get_accessible_member_functions_t = typename get_accessible_member_functions<T>::type; | ||
+ | template <Record T> | ||
+ | using get_member_functions_t = typename get_member_functions<T>::type; | ||
+ | template <Record T> | ||
+ | using get_public_member_types_t = typename get_public_member_types<T>::type; | ||
+ | template <Record T> | ||
+ | using get_accessible_member_types_t = typename get_accessible_member_types<T>::type; | ||
+ | template <Record T> | ||
+ | using get_member_types_t = typename get_member_types<T>::type; | ||
+ | template <Record T> | ||
+ | using get_constructors_t = typename get_constructors<T>::type; | ||
+ | template <Record T> | ||
+ | using get_destructor_t = typename get_destructor<T>::type; | ||
+ | template <Record T> | ||
+ | using get_operators_t = typename get_operators<T>::type; | ||
+ | template <Class T> | ||
+ | using get_public_base_classes_t = typename get_public_base_classes<T>::type; | ||
+ | template <Class T> | ||
+ | using get_accessible_base_classes_t = typename get_accessible_base_classes<T>::type; | ||
+ | template <Class T> | ||
+ | using get_base_classes_t = typename get_base_classes<T>::type; | ||
+ | |||
+ | // 21.12.4.8 Enum operations | ||
+ | template <Enum T> struct is_scoped_enum; | ||
+ | template <Enum T> struct get_enumerators; | ||
+ | template <Enum T> struct get_underlying_type; | ||
+ | |||
+ | template <Enum T> | ||
+ | constexpr auto is_scoped_enum_v = is_scoped_enum<T>::value; | ||
+ | template <Enum T> | ||
+ | using get_enumerators_t = typename get_enumerators<T>::type; | ||
+ | template <Enum T> | ||
+ | using get_underlying_type_t = typename get_underlying_type<T>::type; | ||
+ | |||
+ | // 21.12.4.9 Value operations | ||
+ | template <Constant T> struct get_constant; | ||
+ | template <Variable T> struct is_constexpr<T>; | ||
+ | template <Variable T> struct is_static<T>; | ||
+ | template <Variable T> struct is_thread_local; | ||
+ | template <Variable T> struct get_pointer<T>; | ||
+ | |||
+ | template <Constant T> | ||
+ | constexpr auto get_constant_v = get_constant<T>::value; | ||
+ | template <Variable T> | ||
+ | constexpr auto is_thread_local_v = is_thread_local<T>::value; | ||
+ | |||
+ | // 21.12.4.10 Base operations | ||
+ | template <Base T> struct get_class; | ||
+ | template <Base T> struct is_virtual<T>; | ||
+ | template <Base T> struct is_public<T>; | ||
+ | template <Base T> struct is_protected<T>; | ||
+ | template <Base T> struct is_private<T>; | ||
+ | |||
+ | template <Base T> | ||
+ | using get_class_t = typename get_class<T>::type; | ||
+ | |||
+ | // 21.12.4.11 Namespace operations | ||
+ | template <Namespace T> struct is_inline<T>; | ||
+ | |||
+ | // 21.12.4.12 FunctionParameter operations | ||
+ | template <FunctionParameter T> struct has_default_argument; | ||
+ | |||
+ | template <FunctionParameter T> | ||
+ | constexpr auto has_default_argument_v = has_default_argument<T>::value; | ||
+ | |||
+ | // 21.12.4.13 Callable operations | ||
+ | template <Callable T> struct get_parameters; | ||
+ | template <Callable T> struct is_vararg; | ||
+ | template <Callable T> struct is_constexpr<T>; | ||
+ | template <Callable T> struct is_noexcept; | ||
+ | template <Callable T> struct is_inline<T>; | ||
+ | template <Callable T> struct is_deleted; | ||
+ | |||
+ | template <Callable T> | ||
+ | using get_parameters_t = typename get_parameters<T>::type; | ||
+ | template <Callable T> | ||
+ | constexpr auto is_vararg_v = is_vararg<T>::value; | ||
+ | template <Callable T> | ||
+ | constexpr auto is_deleted_v = is_deleted<T>::value; | ||
+ | |||
+ | // 21.12.4.14 ParenthesizedExpression operations | ||
+ | template <ParenthesizedExpression T> struct get_subexpression; | ||
+ | |||
+ | template <ParenthesizedExpression T> | ||
+ | using get_subexpression_t = typename get_subexpression<T>::type; | ||
+ | |||
+ | // 21.12.4.15 FunctionCallExpression operations | ||
+ | template <FunctionCallExpression T> struct get_callable; | ||
+ | |||
+ | template <FunctionCallExpression T> | ||
+ | using get_callable_t = typename get_callable<T>::type; | ||
+ | |||
+ | // 21.12.4.16 FunctionalTypeConversion operations | ||
+ | template <FunctionalTypeConversion T> struct get_constructor; | ||
+ | |||
+ | template <FunctionalTypeConversion T> | ||
+ | using get_constructor_t = typename get_constructor<T>::type; | ||
+ | |||
+ | // 21.12.4.17 Function operations | ||
+ | template <Function T> struct get_pointer<T>; | ||
+ | |||
+ | // 21.12.4.18 MemberFunction operations | ||
+ | template <MemberFunction T> struct is_static<T>; | ||
+ | template <MemberFunction T> struct is_const; | ||
+ | template <MemberFunction T> struct is_volatile; | ||
+ | template <MemberFunction T> struct has_lvalueref_qualifier; | ||
+ | template <MemberFunction T> struct has_rvalueref_qualifier; | ||
+ | template <MemberFunction T> struct is_virtual<T>; | ||
+ | template <MemberFunction T> struct is_pure_virtual<T>; | ||
+ | template <MemberFunction T> struct is_override; | ||
+ | template <MemberFunction T> struct is_final<T>; | ||
+ | |||
+ | template <MemberFunction T> | ||
+ | constexpr auto is_const_v = is_const<T>::value; | ||
+ | template <MemberFunction T> | ||
+ | constexpr auto is_volatile_v = is_volatile<T>::value; | ||
+ | template <MemberFunction T> | ||
+ | constexpr auto has_lvalueref_qualifier_v = has_lvalueref_qualifier<T>::value; | ||
+ | template <MemberFunction T> | ||
+ | constexpr auto has_rvalueref_qualifier_v = has_rvalueref_qualifier<T>::value; | ||
+ | template <MemberFunction T> | ||
+ | constexpr auto is_override_v = is_override<T>::value; | ||
+ | |||
+ | // 21.12.4.19 SpecialMemberFunction operations | ||
+ | template <SpecialMemberFunction T> struct is_implicitly_declared; | ||
+ | template <SpecialMemberFunction T> struct is_defaulted; | ||
+ | |||
+ | template <SpecialMemberFunction T> | ||
+ | constexpr auto is_implicitly_declared_v = is_implicitly_declared<T>::value; | ||
+ | template <SpecialMemberFunction T> | ||
+ | constexpr auto is_defaulted_v = is_defaulted<T>::value; | ||
+ | |||
+ | // 21.12.4.20 Constructor operations | ||
+ | template <Constructor T> struct is_explicit<T>; | ||
+ | |||
+ | // 21.12.4.21 Destructor operations | ||
+ | template <Destructor T> struct is_virtual<T>; | ||
+ | template <Destructor T> struct is_pure_virtual<T>; | ||
+ | |||
+ | // 21.12.4.22 ConversionOperator operations | ||
+ | template <ConversionOperator T> struct is_explicit<T>; | ||
+ | |||
+ | // 21.12.4.23 Lambda operations | ||
+ | template <Lambda T> struct get_captures; | ||
+ | template <Lambda T> struct uses_default_copy_capture; | ||
+ | template <Lambda T> struct uses_default_reference_capture; | ||
+ | template <Lambda T> struct is_call_operator_const; | ||
+ | |||
+ | template <Lambda T> | ||
+ | using get_captures_t = typename get_captures<T>::type; | ||
+ | template <Lambda T> | ||
+ | constexpr auto uses_default_copy_capture_v = uses_default_copy_capture<T>::value; | ||
+ | template <Lambda T> | ||
+ | constexpr auto uses_default_reference_capture_v = uses_default_reference_capture<T>::value; | ||
+ | template <Lambda T> | ||
+ | constexpr auto is_call_operator_const_v = is_call_operator_const<T>::value; | ||
+ | |||
+ | // 21.12.4.24 LambdaCapture operations | ||
+ | template <LambdaCapture T> struct is_explicitly_captured; | ||
+ | template <LambdaCapture T> struct is_init_capture; | ||
+ | |||
+ | template <LambdaCapture T> | ||
+ | constexpr auto is_explicitly_captured_v = is_explicitly_captured<T>::value; | ||
+ | template <LambdaCapture T> | ||
+ | constexpr auto is_init_capture_v = is_init_capture<T>::value; | ||
+ | |||
+ | } // inline namespace v1 | ||
+ | } // namespace std::experimental::reflect | ||
+ | }} | ||
+ | |||
+ | {{langlinks|es|ja|ru|zh}} |
Latest revision as of 02:50, 7 March 2023
This header is part of the Reflection TS.
Defined in namespace
std::experimental::reflect | |
Defined in inline namespace
std::experimental::reflect::v1 | |
Concepts | |
(reflection TS) |
specifies that a type is a meta-object type (concept) |
(reflection TS) |
specifies that a meta-object type is a meta-object sequence type (concept) |
(reflection TS) |
specifies that a meta-object type reflects a template parameter scope (concept) |
(reflection TS) |
specifies that a meta-object type reflects an entity or alias with an associated (possibly empty) name (concept) |
(reflection TS) |
specifies that a meta-object type reflects a type alias, namespace alias, or an alias introduced by a using-declaration (concept) |
(reflection TS) |
specifies that a meta-object type reflects a member-declaration of a class (concept) |
(reflection TS) |
specifies that a meta-object type reflects an enumerator (concept) |
(reflection TS) |
specifies that a meta-object type reflects a variable or data member (concept) |
(reflection TS) |
specifies that a meta-object type satisfies RecordMember , Enumerator , or Variable , or reflects a namespace other than the global namespace (concept) |
(reflection TS) |
specifies that a meta-object type reflects an entity with a type (concept) |
(reflection TS) |
specifies that a meta-object type reflects a namespace (concept) |
(reflection TS) |
specifies that a meta-object type reflects the global namespace (concept) |
(reflection TS) |
specifies that a meta-object type reflects a non-union class type (concept) |
(reflection TS) |
specifies that a meta-object type reflects an enumeration type (concept) |
(reflection TS) |
specifies that a meta-object type reflects a class type (concept) |
(reflection TS) |
specifies that a meta-object type reflects a namespace, class, enumeration, function, closure type, a template parameter scope (concept) |
(reflection TS) |
specifies that a meta-object type reflects a type (concept) |
(reflection TS) |
specifies that a meta-object type reflects an enumerator or a constexpr variable (concept) |
(reflection TS) |
specifies that a meta-object type reflects a direct base class obtained from get_base_classes (concept) |
(reflection TS) |
specifies that a meta-object type reflects a function parameter (concept) |
(reflection TS) |
specifies that a meta-object type reflects a function (including constructors and destructors) (concept) |
(reflection TS) |
specifies that a meta-object type reflects an expression (concept) |
(reflection TS) |
specifies that a meta-object type reflects a parenthesized expression (concept) |
(reflection TS) |
specifies that a meta-object type reflects a function-call-expression (concept) |
(reflection TS) |
specifies that a meta-object type reflects a functional-type-conv-expression (concept) |
(reflection TS) |
specifies that a meta-object type reflects a function (excluding constructors and destructors) (concept) |
(reflection TS) |
specifies that a meta-object type reflects a member function (excluding constructors and destructors) (concept) |
(reflection TS) |
specifies that a meta-object type reflects a special member function (concept) |
(reflection TS) |
specifies that a meta-object type reflects a constructor (concept) |
(reflection TS) |
specifies that a meta-object type reflects a destructor (concept) |
(reflection TS) |
specifies that a meta-object type reflects an operator function or a conversion function (concept) |
(reflection TS) |
specifies that a meta-object type reflects a conversion function (concept) |
(reflection TS) |
specifies that a meta-object type reflects the closure type of a non-generic lambda (concept) |
(reflection TS) |
specifies that a meta-object type reflects a lambda capture (concept) |
Classes | |
| |
(reflection TS) |
checks if two meta-object types reflect the same entity or alias (class template) |
(reflection TS) |
obtains the presumed line number of the declaration of the reflected entity or alias (class template) |
(reflection TS) |
obtains the implementation-defined column number of the declaration of the reflected entity or alias (class template) |
(reflection TS) |
obtains the presumed file name of the declaration of the reflected entity or alias (class template) |
| |
(reflection TS) |
obtains the size of a meta-object sequence (class template) |
(reflection TS) |
obtains the meta-object type with specified index in a sequence (class template) |
(reflection TS) |
applies a template to the meta-object sequence (class template) |
| |
(reflection TS) |
checks if the reflected entity or alias is named (class template) |
(reflection TS) |
obtains the unqualified name of the reflected entity or alias (class template) |
(reflection TS) |
obtains the implementation-defined display name of the reflected entity or alias (class template) |
| |
(reflection TS) |
obtains the meta-object type reflecting the associated entity of the reflected alias (class template) |
| |
(reflection TS) |
obtains the meta-object type reflecting the type of the reflected entity or alias (class template) |
(reflection TS) |
obtains the type of the reflected entity or alias (class template) |
(reflection TS) |
checks if the meta-object type reflects an enumeration type (class template) |
(reflection TS) |
checks if the meta-object type reflects a union type (class template) |
(reflection TS) |
checks if the meta-object type reflects a non-union class type whose declaration uses class or struct respectively (class template) |
| |
(reflection TS) |
obtains the meta-object type reflecting the scope of the reflected entity or alias (class template) |
| |
(reflection TS) |
obtains the meta-object type reflecting the base class in the given base class relationship (class template) |
| |
(reflection TS) |
checks if the reflected member or base class is public (class template) |
(reflection TS) |
checks if the reflected member or base class is protected (class template) |
(reflection TS) |
checks if the reflected member or base class is private (class template) |
| |
obtains a meta-object sequence type whose elements reflect public, accessible, or all data members of the reflected class (class template) | |
obtains a meta-object sequence type whose elements reflect public, accessible, or all member functions of the reflected class (class template) | |
(reflection TS) |
obtains a meta-object sequence type whose elements reflect all constructors of the reflected class (class template) |
(reflection TS) |
obtains a meta-object sequence type whose elements reflect all operator functions and conversion functions declared in the reflected class (class template) |
(reflection TS) |
obtains the meta-object type reflecting the destructor of the reflected class (class template) |
obtains a meta-object sequence type whose elements reflect public, accessible, or all nested type or member typedefs of the reflected class (class template) | |
obtains a meta-object sequence type whose elements reflect public, accessible, or all base classes of the reflected class (class template) | |
| |
(reflection TS) |
checks whether the reflected enumeration is scoped (class template) |
(reflection TS) |
obtains a meta-object sequence type whose elements reflects the enumerators of the reflected enumeration (class template) |
(reflection TS) |
obtains the meta-object type reflecting the underlying type of the reflected enumeration (class template) |
| |
(reflection TS) |
obtains the value of the reflected variable which is a constant expression (class template) |
(reflection TS) |
checks if the variable is declared with thread_local (class template) |
| |
(reflection TS) |
checks whether the reflected parameter has a default argument (class template) |
| |
(reflection TS) |
obtains a meta-object sequence type whose elements reflects the parameters of the reflected function (class template) |
(reflection TS) |
checks whether the parameter list of the reflected function contains an ellipsis parameter (class template) |
(reflection TS) |
checks whether the reflected function is non-throwing (class template) |
(reflection TS) |
checks whether the reflected function is deleted (class template) |
| |
(reflection TS) |
checks if the reflected variable or function is constexpr (class template) |
| |
(reflection TS) |
checks whether the reflected namespace or function is inline (class template) |
| |
(reflection TS) |
obtains the meta-object type reflecting the unparenthesized expression of the reflected parethesized expression (class template) |
| |
(reflection TS) |
obtains the meta-object type reflecting the function in the reflected function-call-expression (class template) |
| |
(reflection TS) |
obtains the meta-object type reflecting the constructor in reflected functional-type-conv-expression (class template) |
| |
(reflection TS) |
get the address of the reflected variable or function, or the pointer-to-member value to the reflected non-static member (class template) |
| |
checks if the reflected member function is declared with const, volatile, &, or && qualifier respectively (class template) | |
(reflection TS) |
checks if the reflected member function overrides a member function of base class (class template) |
| |
(reflection TS) |
checks if the reflected class or member function is marked with final (class template) |
| |
(reflection TS) |
checks if the reflected variable is of static storage duration, or the reflected member function is static (class template) |
| |
(reflection TS) |
checks if the reflected special member function is implicitly declared (class template) |
(reflection TS) |
checks if the reflected special member function is defaulted in its first declaration (class template) |
| |
(reflection TS) |
checks if the reflected constructor or conversion function is declared with explicit (class template) |
| |
(reflection TS) |
checks if the reflected member function is virtual (class template) |
(reflection TS) |
checks if the reflected member function is pure virtual (class template) |
| |
(reflection TS) |
obtains a meta-object sequence type whose elements reflect the captures of the reflected closure type (class template) |
(reflection TS) |
checks if the capture-default of the lambda expression of the reflected closure type is = or & respectively (class template) |
(reflection TS) |
checks if the operator() of the reflected closure type is declared with const (class template) |
| |
(reflection TS) |
checks if the reflected lambda capture is explicitly captured (class template) |
(reflection TS) |
checks if the reflected lambda capture is an init-capture (class template) |
[edit] Synopsis
namespace std::experimental::reflect { inline namespace v1 { // 21.12.3 Concepts for meta-object types template <class T> concept Object = /* see description */; template <class T> concept ObjectSequence = /* see description */; // refines Object template <class T> concept TemplateParameterScope = /* see description */; // refines Scope template <class T> concept Named = /* see description */; // refines Object template <class T> concept Alias = /* see description */; // refines Named and ScopeMember template <class T> concept RecordMember = /* see description */; // refines ScopeMember template <class T> concept Enumerator = /* see description */; // refines Constant template <class T> concept Variable = /* see description */; // refines Typed and ScopeMember template <class T> concept ScopeMember = /* see description */; // refines Named template <class T> concept Typed = /* see description */; // refines Object template <class T> concept Namespace = /* see description */; // refines Named and Scope template <class T> concept GlobalScope = /* see description */; // refines Namespace template <class T> concept Class = /* see description */; // refines Record template <class T> concept Enum = /* see description */; // refines Type, Scope, and ScopeMember template <class T> concept Record = /* see description */; // refines Type, Scope, and ScopeMember template <class T> concept Scope = /* see description */; // refines Object template <class T> concept Type = /* see description */; // refines Named template <class T> concept Constant = /* see description */; // refines Typed and ScopeMember template <class T> concept Base = /* see description */; // refines Object template <class T> concept FunctionParameter = /* see description */; // refines Typed and ScopeMember template <class T> concept Callable = /* see description */; // refines Scope and ScopeMember template <class T> concept Expression = /* see description */; // refines Object template <class T> concept ParenthesizedExpression = /* see description */; // refines Expression template <class T> concept FunctionCallExpression = /* see description */; // refines Expression template <class T> concept FunctionalTypeConversion = /* see description */; // refines Expression template <class T> concept Function = /* see description */; // refines Typed and Callable template <class T> concept MemberFunction = /* see description */; // refines RecordMember and Function template <class T> concept SpecialMemberFunction = /* see description */; // refines RecordMember template <class T> concept Constructor = /* see description */; // refines Callable and RecordMember template <class T> concept Destructor = /* see description */; // refines Callable and SpecialMemberFunction template <class T> concept Operator = /* see description */; // refines Function template <class T> concept ConversionOperator = /* see description */; // refines MemberFunction and Operator template <class T> concept Lambda = /* see description */; // refines Type and Scope template <class T> concept LambdaCapture = /* see description */; // refines Variable // 21.12.4 Meta-object operations // Multi-concept operations template <Object T> struct is_public; template <Object T> struct is_protected; template <Object T> struct is_private; template <Object T> struct is_constexpr; template <Object T> struct is_static; template <Object T> struct is_final; template <Object T> struct is_explicit; template <Object T> struct is_inline; template <Object T> struct is_virtual; template <Object T> struct is_pure_virtual; template <Object T> struct get_pointer; template <class T> requires RecordMember<T> || Base<T> constexpr auto is_public_v = is_public<T>::value; template <class T> requires RecordMember<T> || Base<T> constexpr auto is_protected_v = is_protected<T>::value; template <class T> requires RecordMember<T> || Base<T> constexpr auto is_private_v = is_private<T>::value; template <class T> requires Variable<T> || Callable<T> constexpr auto is_constexpr_v = is_constexpr<T>::value; template <class T> requires Variable<T> || MemberFunction<T> constexpr auto is_static_v = is_static<T>::value; template <class T> requires Class<T> || MemberFunction<T> constexpr auto is_final_v = is_final<T>::value; template <class T> requires Constructor<T> || ConversionOperator<T> constexpr auto is_explicit_v = is_explicit<T>::value; template <class T> requires Namespace<T> || Callable<T> constexpr auto is_inline_v = is_inline<T>::value; template <class T> requires Base<T> || MemberFunction<T> || Destructor<T> constexpr auto is_virtual_v = is_virtual<T>::value; template <class T> requires MemberFunction<T> || Destructor<T> constexpr auto is_pure_virtual_v = is_pure_virtual<T>::value; template <class T> requires Variable<T> || Function<T> constexpr auto get_pointer_v = get_pointer<T>::value; // 21.12.4.1 Object operations template <Object T1, Object T2> struct reflects_same; template <Object T> struct get_source_line; template <Object T> struct get_source_column; template <Object T> struct get_source_file_name; template <Object T1, Object T2> constexpr auto reflects_same_v = reflects_same<T1, T2>::value; template <class T> constexpr auto get_source_line_v = get_source_line<T>::value; template <class T> constexpr auto get_source_column_v = get_source_column<T>::value; template <class T> constexpr auto get_source_file_name_v = get_source_file_name<T>::value; // 21.12.4.2 ObjectSequence operations template <ObjectSequence T> struct get_size; template <size_t I, ObjectSequence T> struct get_element; template <template <class...> class Tpl, ObjectSequence T> struct unpack_sequence; template <ObjectSequence T> constexpr auto get_size_v = get_size<T>::value; template <size_t I, ObjectSequence T> using get_element_t = typename get_element<I, T>::type; template <template <class...> class Tpl, ObjectSequence T> using unpack_sequence_t = typename unpack_sequence<Tpl, T>::type; // 21.12.4.3 Named operations template <Named T> struct is_unnamed; template <Named T> struct get_name; template <Named T> struct get_display_name; template <Named T> constexpr auto is_unnamed_v = is_unnamed<T>::value; template <Named T> constexpr auto get_name_v = get_name<T>::value; template <Named T> constexpr auto get_display_name_v = get_display_name<T>::value; // 21.12.4.4 Alias operations template <Alias T> struct get_aliased; template <Alias T> using get_aliased_t = typename get_aliased<T>::type; // 21.12.4.5 Type operations template <Typed T> struct get_type; template <Type T> struct get_reflected_type; template <Type T> struct is_enum; template <Class T> struct uses_class_key; template <Class T> struct uses_struct_key; template <Type T> struct is_union; template <Typed T> using get_type_t = typename get_type<T>::type; template <Type T> using get_reflected_type_t = typename get_reflected_type<T>::type; template <Type T> constexpr auto is_enum_v = is_enum<T>::value; template <Class T> constexpr auto uses_class_key_v = uses_class_key<T>::value; template <Class T> constexpr auto uses_struct_key_v = uses_struct_key<T>::value; template <Type T> constexpr auto is_union_v = is_union<T>::value; // 21.12.4.6 Member operations template <ScopeMember T> struct get_scope; template <RecordMember T> struct is_public<T>; template <RecordMember T> struct is_protected<T>; template <RecordMember T> struct is_private<T>; template <ScopeMember T> using get_scope_t = typename get_scope<T>::type; // 21.12.4.7 Record operations template <Record T> struct get_public_data_members; template <Record T> struct get_accessible_data_members; template <Record T> struct get_data_members; template <Record T> struct get_public_member_functions; template <Record T> struct get_accessible_member_functions; template <Record T> struct get_member_functions; template <Record T> struct get_public_member_types; template <Record T> struct get_accessible_member_types; template <Record T> struct get_member_types; template <Record T> struct get_constructors; template <Record T> struct get_destructor; template <Record T> struct get_operators; template <Class T> struct get_public_base_classes; template <Class T> struct get_accessible_base_classes; template <Class T> struct get_base_classes; template <Class T> struct is_final<T>; template <Record T> using get_public_data_members_t = typename get_public_data_members<T>::type; template <Record T> using get_accessible_data_members_t = typename get_accessible_data_members<T>::type; template <Record T> using get_data_members_t = typename get_data_members<T>::type; template <Record T> using get_public_member_functions_t = typename get_public_member_functions<T>::type; template <Record T> using get_accessible_member_functions_t = typename get_accessible_member_functions<T>::type; template <Record T> using get_member_functions_t = typename get_member_functions<T>::type; template <Record T> using get_public_member_types_t = typename get_public_member_types<T>::type; template <Record T> using get_accessible_member_types_t = typename get_accessible_member_types<T>::type; template <Record T> using get_member_types_t = typename get_member_types<T>::type; template <Record T> using get_constructors_t = typename get_constructors<T>::type; template <Record T> using get_destructor_t = typename get_destructor<T>::type; template <Record T> using get_operators_t = typename get_operators<T>::type; template <Class T> using get_public_base_classes_t = typename get_public_base_classes<T>::type; template <Class T> using get_accessible_base_classes_t = typename get_accessible_base_classes<T>::type; template <Class T> using get_base_classes_t = typename get_base_classes<T>::type; // 21.12.4.8 Enum operations template <Enum T> struct is_scoped_enum; template <Enum T> struct get_enumerators; template <Enum T> struct get_underlying_type; template <Enum T> constexpr auto is_scoped_enum_v = is_scoped_enum<T>::value; template <Enum T> using get_enumerators_t = typename get_enumerators<T>::type; template <Enum T> using get_underlying_type_t = typename get_underlying_type<T>::type; // 21.12.4.9 Value operations template <Constant T> struct get_constant; template <Variable T> struct is_constexpr<T>; template <Variable T> struct is_static<T>; template <Variable T> struct is_thread_local; template <Variable T> struct get_pointer<T>; template <Constant T> constexpr auto get_constant_v = get_constant<T>::value; template <Variable T> constexpr auto is_thread_local_v = is_thread_local<T>::value; // 21.12.4.10 Base operations template <Base T> struct get_class; template <Base T> struct is_virtual<T>; template <Base T> struct is_public<T>; template <Base T> struct is_protected<T>; template <Base T> struct is_private<T>; template <Base T> using get_class_t = typename get_class<T>::type; // 21.12.4.11 Namespace operations template <Namespace T> struct is_inline<T>; // 21.12.4.12 FunctionParameter operations template <FunctionParameter T> struct has_default_argument; template <FunctionParameter T> constexpr auto has_default_argument_v = has_default_argument<T>::value; // 21.12.4.13 Callable operations template <Callable T> struct get_parameters; template <Callable T> struct is_vararg; template <Callable T> struct is_constexpr<T>; template <Callable T> struct is_noexcept; template <Callable T> struct is_inline<T>; template <Callable T> struct is_deleted; template <Callable T> using get_parameters_t = typename get_parameters<T>::type; template <Callable T> constexpr auto is_vararg_v = is_vararg<T>::value; template <Callable T> constexpr auto is_deleted_v = is_deleted<T>::value; // 21.12.4.14 ParenthesizedExpression operations template <ParenthesizedExpression T> struct get_subexpression; template <ParenthesizedExpression T> using get_subexpression_t = typename get_subexpression<T>::type; // 21.12.4.15 FunctionCallExpression operations template <FunctionCallExpression T> struct get_callable; template <FunctionCallExpression T> using get_callable_t = typename get_callable<T>::type; // 21.12.4.16 FunctionalTypeConversion operations template <FunctionalTypeConversion T> struct get_constructor; template <FunctionalTypeConversion T> using get_constructor_t = typename get_constructor<T>::type; // 21.12.4.17 Function operations template <Function T> struct get_pointer<T>; // 21.12.4.18 MemberFunction operations template <MemberFunction T> struct is_static<T>; template <MemberFunction T> struct is_const; template <MemberFunction T> struct is_volatile; template <MemberFunction T> struct has_lvalueref_qualifier; template <MemberFunction T> struct has_rvalueref_qualifier; template <MemberFunction T> struct is_virtual<T>; template <MemberFunction T> struct is_pure_virtual<T>; template <MemberFunction T> struct is_override; template <MemberFunction T> struct is_final<T>; template <MemberFunction T> constexpr auto is_const_v = is_const<T>::value; template <MemberFunction T> constexpr auto is_volatile_v = is_volatile<T>::value; template <MemberFunction T> constexpr auto has_lvalueref_qualifier_v = has_lvalueref_qualifier<T>::value; template <MemberFunction T> constexpr auto has_rvalueref_qualifier_v = has_rvalueref_qualifier<T>::value; template <MemberFunction T> constexpr auto is_override_v = is_override<T>::value; // 21.12.4.19 SpecialMemberFunction operations template <SpecialMemberFunction T> struct is_implicitly_declared; template <SpecialMemberFunction T> struct is_defaulted; template <SpecialMemberFunction T> constexpr auto is_implicitly_declared_v = is_implicitly_declared<T>::value; template <SpecialMemberFunction T> constexpr auto is_defaulted_v = is_defaulted<T>::value; // 21.12.4.20 Constructor operations template <Constructor T> struct is_explicit<T>; // 21.12.4.21 Destructor operations template <Destructor T> struct is_virtual<T>; template <Destructor T> struct is_pure_virtual<T>; // 21.12.4.22 ConversionOperator operations template <ConversionOperator T> struct is_explicit<T>; // 21.12.4.23 Lambda operations template <Lambda T> struct get_captures; template <Lambda T> struct uses_default_copy_capture; template <Lambda T> struct uses_default_reference_capture; template <Lambda T> struct is_call_operator_const; template <Lambda T> using get_captures_t = typename get_captures<T>::type; template <Lambda T> constexpr auto uses_default_copy_capture_v = uses_default_copy_capture<T>::value; template <Lambda T> constexpr auto uses_default_reference_capture_v = uses_default_reference_capture<T>::value; template <Lambda T> constexpr auto is_call_operator_const_v = is_call_operator_const<T>::value; // 21.12.4.24 LambdaCapture operations template <LambdaCapture T> struct is_explicitly_captured; template <LambdaCapture T> struct is_init_capture; template <LambdaCapture T> constexpr auto is_explicitly_captured_v = is_explicitly_captured<T>::value; template <LambdaCapture T> constexpr auto is_init_capture_v = is_init_capture<T>::value; } // inline namespace v1 } // namespace std::experimental::reflect