std::functi...::operator()(3)
π 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 storedthunk-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 ofstd::function<R(Args...)>operator()calls the stored function β public member function ofstd::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
- 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