
14 Mar
2007
14 Mar
'07
12:35 p.m.
On Wed, 14 Mar 2007 07:43:47 -0400, Braddock Gaskill wrote:
And example of an unintrusive operator||() is below. template<typename T> future<T> operator||(future<T> &a, future<T> &b) { future_or<T> fa(a, b); a.add_callback(fa); return fa.p_; }
Minor bug in the code I just posted, I left out b.add_callback(fa) in here.
Are there any thoughts on how && and || operators should properly handle exceptions?
How to handle future< int > && future< std::string > && future< my_class
? Should promise contain a tuple (fusion container?) for the result types?
Oliver