
16 Mar
2007
16 Mar
'07
10:03 a.m.
On Wed, 14 Mar 2007 22:48:31 +0200, Peter Dimov wrote:
As for operator&&, it doesn't deliver any extra functionality. Instead of wating for f1 && f2, you just wait for f1, then f2:
future<int> f1 = fork( f, x ); future<int> f2 = fork( f, y );
std::cout << f1 + f2 << std::endl;
I gotta say I'm hard-pressed to think of a real-life situation where this is not a sufficient replacement for operator&&. operator|| still has merit though - how would you see that working with implicitly convertible/blocking futures as proposed? Or would it just have to be dropped? -braddock