fixed compilation error in 2013 (does not support thread_local keyword)

This commit is contained in:
gabime 2016-12-02 17:48:10 +02:00
parent 5d23e88c16
commit 33494049a8
1 changed files with 4 additions and 0 deletions

View File

@ -315,8 +315,12 @@ inline size_t _thread_id()
//Return current thread id as size_t (from thread local storage)
inline size_t thread_id()
{
#if defined(_MSC_VER) && (_MSC_VER < 1900)
return _thread_id();
#else
static thread_local const size_t tid = _thread_id();
return tid;
#endif
}