// Copyright (C) 2009 Vicente J. Botet Escriba // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include #include static bool mycallable1_called =false; struct mycallable1 { void operator()() { mycallable1_called=true; }; }; void my_thread() { mycallable1 x; boost::this_thread::at_thread_exit(x); } void test_ticket_2742() { boost::thread th(my_thread); th.join(); BOOST_CHECK(mycallable1_called); } boost::unit_test_framework::test_suite* init_unit_test_suite(int, char*[]) { boost::unit_test_framework::test_suite* test = BOOST_TEST_SUITE("Boost.Threads: ticket 2742"); test->add(BOOST_TEST_CASE(test_ticket_2742)); return test; }