halcheck 1.0
Loading...
Searching...
No Matches

◆ retry() [2/2]

template<typename F >
lib::invoke_result_t< F, lib::atom > halcheck::gen::retry ( lib::atom id,
std::uintmax_t max,
F func )

Executes a function. If the function calls discard, then it is retried, up to a certain number of times.

Template Parameters
FThe type of function to call.
Parameters
idA unique identifier for the generated value.
maxThe maximum number of tries.
funcThe function to call.
Returns
The result of func.