Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::function_ref::operator()

      From cppreference.com
      <cpp‎ |utility‎ |functional‎ |function ref
       
       
      Utilities library
       
      Function objects
      Function invocation
      (C++17)(C++23)
      Identity function object
      (C++20)
      Old binders and adaptors
      (until C++17*)
      (until C++17*)
      (until C++17*)
      (until C++17*)  
      (until C++17*)
      (until C++17*)(until C++17*)(until C++17*)(until C++17*)
      (until C++20*)
      (until C++20*)
      (until C++17*)(until C++17*)
      (until C++17*)(until C++17*)

      (until C++17*)
      (until C++17*)(until C++17*)(until C++17*)(until C++17*)
      (until C++20*)
      (until C++20*)
       
       
      R operator()( Args...args)constnoexcept(/*noex*/);
      (since C++26)

      Invokes the storedthunk-ptr withbound-entity as its first parameter and the rest of the parametersargs. The/*noex*/ part ofoperator() is identical to those of the template parameter ofstd::function_ref.

      Equivalent toreturnthunk-ptr(bound-entity,std::forward<Args>(args)...);.

      Contents

      [edit]Parameters

      args - rest parameters to pass to the storedthunk-ptr

      [edit]Return value

      thunk-ptr(bound-entity,std::forward<Args>(args)...).

      [edit]Exceptions

      Propagates the exception thrown by the underlying function call.

      [edit]Example

      This section is incomplete
      Reason: no example

      [edit]See also

      invokes the target
      (public member function ofstd::function<R(Args...)>)[edit]
      calls the stored function
      (public member function ofstd::reference_wrapper<T>)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/utility/functional/function_ref/operator()&oldid=178010"

      [8]ページ先頭

      ©2009-2025 Movatter.jp