]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
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 | ||
6 | #define BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG | |
7 | ||
8 | #include <iostream> | |
9 | #include <boost/thread/thread_only.hpp> | |
10 | ||
11 | class ThreadClass | |
12 | { | |
13 | public: | |
14 | ThreadClass() | |
15 | { | |
16 | } | |
17 | ||
18 | void operator()() | |
19 | { | |
20 | return; | |
21 | } | |
22 | }; | |
23 | ||
24 | int main() | |
25 | { | |
26 | boost::posix_time::ptime currentTimeUTC; | |
27 | ||
28 | ThreadClass tc; | |
29 | boost::thread t(tc); | |
30 | t.join(); //causes a runtime access violation here | |
31 | ||
32 | std::cout << "done" << std::endl; | |
33 | //system("pause"); | |
34 | ||
35 | return 0; | |
36 | } |