You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea would be to provide a shorthand for this idiom:
auto lambda = [](auto& self) -> single_result<int>
{
// each agent computes some result
int my_result = compute_my_result(self);
// only one agent needs to return a result
if(self.elect())
{
return my_result;
}
return ignore;
}
With some sugar we could have something like:
auto lambda = [](auto& self)
{
// only one agent needs to return a result
return elect_value(self, compute_my_result(self));
}
What's nice about the sugar in this example is that it eliminates the requirement to annotate the return type of the lambda with single_result<int>.
The text was updated successfully, but these errors were encountered:
The idea would be to provide a shorthand for this idiom:
With some sugar we could have something like:
What's nice about the sugar in this example is that it eliminates the requirement to annotate the return type of the lambda with
single_result<int>
.The text was updated successfully, but these errors were encountered: