nana/include/nana/std_thread.hpp
Ac d86a8cfad2 use std::thread if gcc is compiled with c++11 threading support
NANA_CMAKE_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ option must still be enabled but mingw.thread.h and mingw.mutex.h will be ignored if _GLIBCXX_HAS_GTHREADS is defined
2017-09-29 11:06:22 +09:00

29 lines
509 B
C++

#ifndef NANA_STD_THREAD_HPP
#define NANA_STD_THREAD_HPP
#include <nana/config.hpp>
#if defined(STD_THREAD_NOT_SUPPORTED)
#if defined(NANA_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ)
#ifdef _GLIBCXX_HAS_GTHREADS
# include <thread>
#else
# include <mingw.thread.h>
#endif
#else
#include <boost/thread.hpp>
namespace std
{
typedef boost::thread thread;
}
#endif // (NANA_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ)
#else
#include <thread>
#endif // (STD_THREAD_NOT_SUPPORTED)
#endif // NANA_STD_THREAD_HPP