std::experi...ocation_type(3)
Okay so this is std::experi...ocation_type(3), from the C++ Standard Libary manual β yes, thatβs the manual name, and the title got truncated like itβs allergic to vowels π. Buckle up, bestie, because this page is about std::experimental::invocation_type and std::experimental::raw_invocation_type.
π NAME π
std::experimental::invocation_type,std::experimental::raw_invocation_type β literally the two names, no cap: std::experimental::invocation_type and std::experimental::raw_invocation_type. The dash in the original is just the manpage doing its little separator thing π.
β¨ Synopsis β¨
Defined in header <experimental/type_traits>
template< class >
struct raw_invocation_type; //undefined
(1) (library fundamentals TS)
template< class Fn, class... ArgTypes >
struct raw_invocation_type<Fn(ArgTypes...)>;
template< class >
struct invocation_type; //undefined
(2) (library fundamentals TS)
template< class Fn, class... ArgTypes >
struct invocation_type<Fn(ArgTypes...)>;
This computes the invocation parameters when Fn is called with the arguments ArgTypes..., as in INVOKE(std::declval<Fn>(), std::declval<ArgTypes>()...), where INVOKE is the operation defined in Callable. π¦
The invocation parameters of the expression INVOKE(f, t1, t2, ..., tN) are defined as follows, where T1 is the (possibly cv-qualified) type of t1 and U1 is T1& if t1 is an lvalue and T1&& otherwise:
- If
fis a pointer to a member function of a classT, then the invocation parameters areU1followed by the parameters offmatched byt2, ..., tN. - If
N == 1andfis a pointer to member data of a classT, then the invocation parameter isU1. - If
fis an object of class type, the invocation parameters are the parameters matchingt1, ..., tNof the best viable function for the argumentst1, ..., tNamong the function call operators and surrogate call functions off. - In all other cases, the invocation parameters are the parameters of
fmatchingt1, ..., tN.
If an argument tI matches an ellipsis in the functionβs parameter list, the corresponding invocation parameter is the result of applying the default argument promotions to tI. π₯
Fn and all types in ArgTypes can be any complete type, array of unknown bound, or (possibly cv-qualified) void.
π«Ά Member types π«Ά
raw_invocation_type<Fn(ArgTypes...)>::typeβ this one isR(T1, T2, ...), where:Risstd::result_of_t<Fn(ArgTypes...)>.T1, T2, ...are the invocation parameters ofINVOKE(std::declval<Fn>(), std::declval<ArgTypes>()...)as defined above.
Only defined if Fn can be called with the arguments ArgTypes... in unevaluated context.
invocation_type<Fn(ArgTypes...)>::typeβ this one isR(U1, U2, ...), where:Risstd::result_of_t<Fn(ArgTypes...)>.T1, T2, ...are the invocation parameters ofINVOKE(std::declval<Fn>(), std::declval<ArgTypes>()...)as defined above.A1, A2, ...denotesArgTypes....Uiisstd::decay_t<Ai>ifstd::declval<Ai>()is an rvalue andTiotherwise.
Only defined if Fn can be called with the arguments ArgTypes... in unevaluated context. π
π§ Helper types π§
template< class T >
using raw_invocation_type_t = typename raw_invocation_type<T>::type;
(library fundamentals TS)
template< class T >
using invocation_type_t = typename invocation_type<T>::type;
(library fundamentals TS)
π Example π
This section is incomplete.
Reason: no example. π
π See also π
- C++ documentation for Reflection TS.
π Category π
- Todo no example.
Thatβs the whole std::experi...ocation_type(3) page, bestie β sourced from http://cppreference.com, dated 2024.06.10. Slay and read your templates responsibly π
π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms