In file included from /usr/include/c++/4.9/thread:35:0,
from prog.cpp:2:
/usr/include/c++/4.9/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support for the \
^
prog.cpp:6:6: error: 'timed_mutex' in namespace 'std' does not name a type
std::timed_mutex g_timed_mutex;
^
prog.cpp: In function 'void thread1()':
prog.cpp:10:2: error: 'unique_lock' is not a member of 'std'
std::unique_lock<std::timed_mutex> t1(g_timed_mutex);
^
prog.cpp:10:19: error: 'timed_mutex' is not a member of 'std'
std::unique_lock<std::timed_mutex> t1(g_timed_mutex);
^
prog.cpp:10:40: error: 'g_timed_mutex' was not declared in this scope
std::unique_lock<std::timed_mutex> t1(g_timed_mutex);
^
prog.cpp:10:53: error: 't1' was not declared in this scope
std::unique_lock<std::timed_mutex> t1(g_timed_mutex);
^
prog.cpp:11:12: error: 'Sleep' was not declared in this scope
Sleep(3000);
^
prog.cpp: In function 'void thread2()':
prog.cpp:17:2: error: 'unique_lock' is not a member of 'std'
std::unique_lock<std::time_mutex> t1(g_timed_mutex,std::chrono::milliseconds(1000));
^
prog.cpp:17:19: error: 'time_mutex' is not a member of 'std'
std::unique_lock<std::time_mutex> t1(g_timed_mutex,std::chrono::milliseconds(1000));
^
prog.cpp:17:39: error: 'g_timed_mutex' was not declared in this scope
std::unique_lock<std::time_mutex> t1(g_timed_mutex,std::chrono::milliseconds(1000));
^
prog.cpp:17:58: error: 'std::chrono' has not been declared
std::unique_lock<std::time_mutex> t1(g_timed_mutex,std::chrono::milliseconds(1000));
^
prog.cpp:17:84: error: 't1' was not declared in this scope
std::unique_lock<std::time_mutex> t1(g_timed_mutex,std::chrono::milliseconds(1000));
^
prog.cpp: In function 'int main()':
prog.cpp:22:2: error: 'thread' is not a member of 'std'
std::thread t1(thread1);
^
prog.cpp:23:12: error: 'Sleep' was not declared in this scope
Sleep(1000);
^
prog.cpp:24:2: error: 'thread' is not a member of 'std'
std::thread t2(thread2);
^
prog.cpp:25:2: error: 't1' was not declared in this scope
t1.join();
^
prog.cpp:26:2: error: 't2' was not declared in this scope
t2.join();
^