I'm using Code::Blocks 13.12 with TDM-GCC (version 4.7.1, 32 bit). When I try to use the thread class, I get the following error:
'thread' is not a member of 'std'
I was sure to #include <thread>
. I enabled the compiler flag -std=c++11
to tell the compiler to conform to the C++11 standard.
I thought maybe my version of GCC wasn't new enough, so I installed TDM-GCC 4.8.1; when I use its compiler, I don't have this problem. However, I then read that GCC versions as low as 4.4 support the C++11 thread class, which means the original version of GCC I had (4.7.1) was already up-to-date enough. What was the problem?