Commit 1c21b1cd authored by Guillaume Roguez's avatar Guillaume Roguez

#29579: sleep_for() issue is for GCC < 4.8.1, not 4.1

parent 475b8e52
......@@ -40,8 +40,11 @@
#include <set>
#include <mutex>
// std::this_thread::sleep_for is by default supported since 4.1
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)
// std::this_thread::sleep_for is by default supported since 4.8.1
#define GCC_VERSION (__GNUC__ * 10000 \
+ __GNUC_MINOR__ * 100 \
+ __GNUC_PATCHLEVEL__)
#if GCC_VERSION >= 40801
#include <chrono>
#include <thread>
#define MYSLEEP(x) std::this_thread::sleep_for(std::chrono::seconds(x))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment