[func.wrap.ref.class]

22 General utilities library [utilities]

22.10 Function objects [function.objects]

22.10.17 Polymorphic function wrappers [func.wrap]

22.10.17.6 Non-owning wrapper [func.wrap.ref]

22.10.17.6.2 Class template function_ref [func.wrap.ref.class]

namespace std { template<class R, class... ArgTypes> class function_ref<R(ArgTypes...) cv noexcept(noex)> { public: template<class F> function_ref(F*) noexcept; template<class F> constexpr function_ref(F&&) noexcept; template<auto f> constexpr function_ref(constant_arg_t<f>) noexcept; template<auto f, class U> constexpr function_ref(constant_arg_t<f>, U&&) noexcept; template<auto f, class T> constexpr function_ref(constant_arg_t<f>, cv T*) noexcept; constexpr function_ref(const function_ref&) noexcept = default; constexpr function_ref& operator=(const function_ref&) noexcept = default; template<class T> function_ref& operator=(T) = delete; R operator()(ArgTypes...) const noexcept(noex); private: template<class... T> static constexpr bool is-invocable-using = see below; R (*thunk-ptr)(BoundEntityType, ArgTypes&&...) noexcept(noex); BoundEntityType bound-entity; }; template<class F> function_ref(F*) -> function_ref<F>; template<auto f> function_ref(constant_arg_t<f>) -> function_ref<see below>; template<auto f, class T> function_ref(constant_arg_t<f>, T&&) -> function_ref<see below>; }

An object of class function_ref<R(Args...) cv noexcept(noex)> stores a pointer to function thunk-ptr and an object bound-entity.

The object bound-entity has an unspecified trivially copyable type BoundEntityType, that models copyable and is capable of storing a pointer to object value or a pointer to function value.

The type of thunk-ptr is R(*)(BoundEntityType, Args&&...) noexcept(noex).

Within subclause [func.wrap.ref], call-args is an argument pack with elements such that decltype((call-args))... denote ArgTypes&&... respectively.