![]() |
Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
|
Public Types | |
| using | result_type = Ret |
Public Member Functions | |
| template<typename F> requires ( !std::is_same_v<std::decay_t<F>, fun> && !std::is_same_v<std::decay_t<F>, std::function<Ret(Args...)>> && !std::is_same_v<std::decay_t<F>, std::nullptr_t> && std::is_constructible_v<std::function<Ret(Args...)>, F>) | |
| fun (F &&callable) | |
| fun (const std::function< Ret(Args...)> &fn) | |
| fun (std::function< Ret(Args...)> &&fn) | |
| fun (std::nullptr_t)=delete | |
| template<typename... Ts> | |
| Ret | operator() (Ts &&... args) const |
| const std::function< Ret(Args...)> & | get_fn () const & |
| std::function< Ret(Args...)> | get_fn () && |
|
inline |
Construct from any callable that std::function accepts.
Excludes fun itself (handled by copy/move), std::function (handled by explicit constructors below), and nullptr.
|
inlineexplicit |
Construct from an existing std::function. Explicit because an empty std::function will throw.
|
delete |
Prevent construction from nullptr at compile time.
|
inline |
Get the underlying std::function.