Boost logo

Boost :

From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2003-11-27 04:02:14


The source file libs/thread/test/test_thread.cpp has an ISO violation on
line 30. The line in question passes a temporary as a reference to
operator==(). The standard requires that another temporary be used for
the reference parameter. That reference may be eliminated, but the
usual access checks must be preformed before the temporary is
eliminated. Since a thread is noncopyable you can't copy construct the
temporary.
(credit to Sean Perry for finding this one)

He proposed also following fix:

Instead of
BOOST_TEST(thrd == boost::thread());
Do
boost::thread thrd1;
BOOST_TEST(thrd == thrd1);

Does anyone (William Kempf ?) object to this (minor) change ?

Toon Knapen


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