|
Boost : |
From: Victor A. Wagner, Jr. (vawjr_at_[hidden])
Date: 2002-08-11 04:17:07
At Friday 2002/08/09 13:43, you wrote:
>From: "Victor A. Wagner, Jr." <vawjr_at_[hidden]>
> > >I want to be able to transform this to:
> > >
> > >thread<double> tf1(bind(f, 1.0));
> > >thread<double> tf2(bind(f, 2.0));
> > >thread<double> tf3(bind(f, 3.0));
> >
> > I trust that:
> >
> > thread<double,std_exceptions> tf1(bind(f, 1.0));
> > thread<double,std_exceptions> tf2(bind(f, 2.0));
> > thread<double,std_exceptions> tf3(bind(f, 3.0));
> >
> > would be acceptable also?
>
>I am definitely not thrilled by the opportunity to repeat ",
>std_exceptions". :-) Besides, "std_exceptions" doesn't describe the
>semantics well. "propagate_exceptions" would be better.
>
>A compromise would be
>
>template< class R = void, class P = select_default_policy<R> > class thread;
>
>where R = void gets "terminate_on_exception" and R != void gets
>"propagate_exceptions". Then measure how often the second template argument
>actually gets used in code. I can venture a guess.
This is what I actually meant when I suggested thread<nothrow> the other
day (forgetting for a moment that the return type needs to be there too.
Victor A. Wagner Jr. http://rudbek.com
PGP RSA fingerprint = 4D20 EBF6 0101 B069 3817 8DBF C846 E47A
PGP D-H fingerprint = 98BC 65E3 1A19 43EC 3908 65B9 F755 E6F4 63BB 9D93
The five most dangerous words in the English language:
"There oughta be a law"
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk