Boost logo

Threads-Devel :

Subject: Re: [Threads-devel] Threads and copy constructors...
From: Matthias Vallentin (vallentin_at_[hidden])
Date: 2012-02-22 13:19:58


>   boost::thread t1( c1 );

If you just want to avoid copying, you could wrap use a reference wrapper:

    boost::thread t1( boost::ref(c1) );

See http://www.boost.org/doc/libs/1_48_0/doc/html/ref.html for details.

    Matthias


Threads-Devel list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk