Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2001-06-27 13:20:12


On Wed, 27 Jun 2001 williamkempf_at_[hidden] wrote:
> --- In boost_at_y..., "Greg Colvin" <gcolvin_at_u...> wrote:
> > From: <williamkempf_at_h...>
> > > Considering all of the discussion so far, I think this slightly
> > > modified interface is the best design so far:
> > >
> > > class thread : boost::noncopyable
> > > {
> > > public:
> > > thread(detail::threadproc proc); // Starts the thread
> > Do I have to reach down into thread::detail to declare my
> > proc, or will this eventually be templatatized to take any
> > function or function object of zero arguments?
>
> No, you never directly use anything from detail namespaces. In this
> case detail::threadproc is just a typedef to boost::function1<void>.
> This already qualifies any function or function object taking zero
> arguments as valid.

Then the interface of the constructor should be specified as taking
boost::function1<void> and not detail::threadproc.

Cheers,
Jeremy

----------------------------------------------------------------------
 Jeremy Siek www: http://www.lsc.nd.edu/~jsiek/
 Ph.D. Candidate, IU B'ton email: jsiek_at_[hidden]
 Summer Manager, AT&T Research phone: (973) 360-8185
----------------------------------------------------------------------


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk