std :: this_thread :: sleep_for()関数を使おうとしましたが、エラーが発生しまし
error: 'std::this_thread' has not been declared
た。
フラグ_GLIBCXX_USE_NANOSLEEPが含まれています。
それを強制的に機能させるには、他に何が必要ですか?
MinGW ==> gccバージョン4.7.2(GCC)
SSCCE:
#include<thread>
int main() {
std::this_thread::sleep_for(std::chrono::seconds(3));
}
コマンドライン:
g++ -D_GLIBCXX_USE_NANOSLEEP -std=gnu++0x ssce.cpp -o ssce.exe
コンパイルの結果:
ssce.cpp: In function 'int main()':
ssce.cpp:4:8: error: 'std::this_thread' has not been declared