]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/boost_install/test/thread/quick.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / tools / boost_install / test / thread / quick.cpp
1
2 // Copyright 2017, 2018 Peter Dimov.
3 //
4 // Distributed under the Boost Software License, Version 1.0.
5 //
6 // See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt
8
9 #include <boost/thread.hpp>
10 #include <boost/core/lightweight_test.hpp>
11
12 void f( int & x, int y )
13 {
14 x = y;
15 }
16
17 int main()
18 {
19 int x = 0;
20
21 boost::thread th( f, boost::ref( x ), 12 );
22 th.join();
23
24 BOOST_TEST_EQ( x, 12 );
25
26 return boost::report_errors();
27 }