promise constructor overload?

Issue #60 resolved
Dan Bonachea created an issue

Currently I think there is no way to write a single expression that constructs a promise with a dependency count other than 1 (without writing your own function to encapsulate this pattern).

It might be nice to either provide a constructor with an optional dependency count argument (required to be >= 1), or alternatively for promise::require_anonymous() to return *this, allowing code like:

return new promise<int>(4);
return &((new promise<int>)->require_anonymous(3));

Perhaps there is another concise way to do this?

Comments (3)

  1. Log in to comment