deductiongu...function_ref(3)
β¨ NAME β¨
okay so bestie, we're deep in deductiongu...function_ref(3) from the C++ Standard Libary β yes, the header spells it βLibary,β and honestly? iconic. Buckle up, because this page is all about deduction guides for std::function_ref. π
The name is literally deductionguidesforstd::function_ref β and the description? Also deductionguidesforstd::function_ref. No notes, that's the vibe. π«Ά
πΈ Synopsis πΈ
Defined in header <functional> β yes bestie, <functional>, as in functional things. The deduction guides are giving:
template< class F >
(1) (since C++26)
function_ref( F* ) -> function_ref<F>;
template< auto f >
(2) (since C++26)
function_ref( std::nontype_t<f> ) -> function_ref</*see below*/>;
template< auto f, class T >
(3) (since C++26)
function_ref( std::nontype_t<f>, T&& ) -> function_ref</*see below*/>;
Here's the tea on each guide, fr fr:
(1)(since C++26) β This overload participates in overload resolution only ifstd::is_function_v<F>is true. β¨(2)(since C++26) β Let typeFbestd::remove_pointer_t<decltype(f)>. This overload participates in overload resolution only ifstd::is_function_v<F>is true. The deduced type isstd::function_ref<F>. π(3)(since C++26) β Let typeFbedecltype(f). This overload participates in overload resolution only if:Fis of the formR(G::*)(A...) noexcept(E)(optionally cv-qualified, optionally noexcept, optionally lvalue reference qualified) for a typeG, orFis of the formM G::*for a typeGand an object typeM, in which case letRbestd::invoke_result_t<F, T&>,A...be an empty pack, andEbefalse, orFis of the formR(*)(G, A...) noexcept(E)for a typeG.
The deduced type is std::function_ref<R(A...) noexcept(E)>. Periodt. π₯
π Example π
This section is incomplete Reason: no example
the example section is literally giving unfinished homework π
π Category π
Todo no example
That's the whole category, bestie β Todo no example. π«Ά
mwah π β this cutie came from http://cppreference.com, dated 2024.06.10, and the page is deductiongu...function_ref(3). Slay responsibly, bestie. π§
π¦ 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