test_7160.cpp 624 B

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright (C) 2010 Vicente Botet
  2. //
  3. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. #define BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
  6. #include <iostream>
  7. #include <boost/thread/thread_only.hpp>
  8. class ThreadClass
  9. {
  10. public:
  11. ThreadClass()
  12. {
  13. }
  14. void operator()()
  15. {
  16. return;
  17. }
  18. };
  19. int main()
  20. {
  21. boost::posix_time::ptime currentTimeUTC;
  22. ThreadClass tc;
  23. boost::thread t(tc);
  24. t.join(); //causes a runtime access violation here
  25. std::cout << "done" << std::endl;
  26. //system("pause");
  27. return 0;
  28. }