Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::experimental::invocation_type,std::experimental::raw_invocation_type

      From cppreference.com
      <cpp‎ |experimental
       
       
       
       
      template<class>

      struct raw_invocation_type;//undefined

      template<class Fn,class...ArgTypes>

      struct raw_invocation_type<Fn(ArgTypes...)>;
      (1)(library fundamentals TS)
      template<class>

      struct invocation_type;//undefined

      template<class Fn,class...ArgTypes>

      struct invocation_type<Fn(ArgTypes...)>;
      (2)(library fundamentals TS)

      Computes theinvocation parameters whenFn is called with the argumentsArgTypes..., as inINVOKE(std::declval<Fn>(),std::declval<ArgTypes>()...), whereINVOKE is the operation defined inCallable.

      Theinvocation parameters of the expressionINVOKE(f, t1, t2, ..., tN) is defined as follows, whereT1 is the (possibly cv-qualified) type oft1 andU1 isT1& ift1 is an lvalue andT1&& otherwise:

      • Iff is a pointer to a member function of a classT, then the invocation parameters areU1 followed by the parameters off matched byt2, ..., tN.
      • IfN == 1 andf is a pointer to member data of a classT, then the invocation parameter isU1.
      • Iff is an object of class type, the invocation parameters are the parameters matchingt1, ..., tN of the best viable function for the argumentst1, ..., tN among the function call operators and surrogate call functions off.
      • In all other cases, the invocations parameters are the parameters off matchingt1, ..., tN.

      If an argumenttI matches an ellipsis in the function's parameter list, the corresponding invocation parameter is the result of applying the default argument promotions totI.

      Fn and all types inArgTypes can be any complete type, array of unknown bound, or (possibly cv-qualified)void.

      Contents

      [edit]Member types

      Member type Definition
      raw_invocation_type<Fn(ArgTypes...)>::typeR(T1, T2, ...), where:

      Only defined ifFn can be called with the argumentsArgTypes... in unevaluated context.

      invocation_type<Fn(ArgTypes...)>::typeR(U1, U2, ...), where

      Only defined ifFn can be called with the argumentsArgTypes... in unevaluated context.

      [edit]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)

      [edit]Example

      This section is incomplete
      Reason: no example

      [edit]See also

      C++ documentation forReflection TS
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/experimental/invocation_type&oldid=154971"

      [8]ページ先頭

      ©2009-2025 Movatter.jp