Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::InvocableR Concept Reference

#include <concepts.hh>

Concept definition

template<typename CallableT, typename ReturnT, typename ... Args>
concept nix::InvocableR = std::is_invocable_r_v<ReturnT, CallableT, Args...>
Definition args.hh:31
Definition concepts.hh:20

Detailed Description

Like std::invocable<>, but also constrains the return type as well.

Somehow, there is no std concept to do this, even though there is a type trait for it.

Template Parameters
CallableTThe type you want to constrain to be callable, and to return ReturnT when called with Args as arguments.
ReturnTThe type the callable should return when called.
ArgsThe arguments the callable should accept to return ReturnT.