std_function.h(3cxx)
π std_function.h β the 3cxx manual page bestie π
okay so this is the 3cxx manual page for std_function.h. Buckle up, bestie β it's giving internal-header energy, but we're gonna read every line anyway. π
β¨ NAME β¨
std_function.h
πΈ SYNOPSIS πΈ
π§ Classes
struct std::__is_location_invariant< _Tp >β a struct template over_Tp, just hanging out in the header.class std::_Function_baseβ the base class of all polymorphic function object wrappers. It's the mom friend of the wrapper world. π«Άclass std::bad_function_callβ the exception class thrown when a class templatefunction'soperator()gets called with an empty target. Empty target = this exception says hi. πclass std::function< _Res(_ArgTypes...)>β the polymorphic function wrapper itself. Main character energy, honestly. π
π Namespaces
namespace stdβ the toplevel namespace for ISO C++ entities. That's wherestdthings live, iykyk.namespace std::__detailβ implementation details that are not part of thenamespace stdinterface. Basically the backstage area. Do not treat it like public API. π
π¦ Typedefs
template<typename _Fn , typename _Op > using std::__function_guide_t = typename __function_guide_helper< _Op >::typeβ yep, that's the exact alias, character for character. No notes, just vibes. β¨
π Enumerations
enum _Manager_operation { __get_type_info, __get_functor_ptr, __clone_functor, __destroy_functor }β all four enumerators are right there:__get_type_info,__get_functor_ptr,__clone_functor, and__destroy_functor. Slay. π
π₯ Functions
template<typename _Fn , typename _Signature = __function_guide_t<_Fn, decltype(&_Fn::operator())>> std::function (_Fn) -> function< _Signature >β this is the exact signature, double space and all. Not me preserving the formatting, but also yes me. πtemplate<typename _Res , typename... _ArgTypes> std::function (_Res(*)(_ArgTypes...)) -> function< _Res(_ArgTypes...)>β another exact function template signature; keep it verbatim, bestie.template<typename _Res , typename... _Args> bool std::operator== (const function< _Res(_Args...)> &__f, nullptr_t) noexceptβ tests whether a polymorphic function object wrapper is empty. Returnsbool, and it'snoexcept. βtemplate<typename _Res , typename... _Args> void std::swap (function< _Res(_Args...)> &__x, function< _Res(_Args...)> &__y) noexceptβ swaps the targets of two polymorphic function object wrappers. Alsonoexcept, because we love a calm swap. π
π Detailed Description π
This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <functional>. That's the whole warning β internal header, do not touch directly, use <functional> like a civilized icon. π
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. So yes, Doxygen did that. π«Ά
mwah π β final sign-off: the footer says libstdc++ and std_function.h(3cxx). That's the source/version and page energy; date not included in this footer, no cap. π
π¦ where this page comes from
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms