From 33494049a81af2ac0650837e88da09d2a2b5d03d Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 2 Dec 2016 17:48:10 +0200 Subject: [PATCH] fixed compilation error in 2013 (does not support thread_local keyword) --- include/spdlog/details/os.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/spdlog/details/os.h b/include/spdlog/details/os.h index af1e4cc4..a4e467cf 100644 --- a/include/spdlog/details/os.h +++ b/include/spdlog/details/os.h @@ -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 }