std::functi...::operator()(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ’– NAME πŸ’–

okay bestie, welcome to the std::function_ref::operator() page from the C++ Standard Libary manual β€” the header is doing that truncated std::functi...::operator()(3) thing, iykyk ✨

The NAME line is literally std::function_ref::operator() - std::function_ref::operator(). self-titled icon behavior, no cap πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

Here's the signature, copied exactly because we do not mess with code:

R operator()( Args... args ) const noexcept(/*noex*/);  (since C++26)

Okay so operator() invokes the stored thunk-ptr with bound-entity as its first parameter and the rest of the parameters args.

The /*noex*/ part of operator() is identical to those of the template parameter of std::function_ref.

Equivalent to return thunk-ptr(bound-entity, std::forward<Args>(args)...);. periodt πŸ’…


🌸 PARAMETERS 🌸

  • args β€” rest parameters to pass to the stored thunk-ptr

πŸ’– RETURN VALUE πŸ’–

thunk-ptr(bound-entity, std::forward<Args>(args)...). that's the whole vibe 🫢


πŸ”₯ EXCEPTIONS πŸ”₯

Propagates the exception thrown by the underlying function call. if the underlying call throws, this doesn't swallow it β€” it lets it through 😭


πŸŽ€ EXAMPLE πŸŽ€

This section is incomplete Reason: no example

πŸ‘‘ SEE ALSO πŸ‘‘

  • operator() invokes the target β€” public member function of std::function<R(Args...)>
  • operator() calls the stored function β€” public member function of std::reference_wrapper<T>

πŸ’€ CATEGORY πŸ’€

  • Todo no example

xoxo, your Unix bestie πŸ’… β€” source/version: http://cppreference.com; date: 2024.06.10; page: std::functi...::operator()(3) ✨

πŸ“¦ where this page comes from