From f7574eb4c78e7c563900aeac8e6e6807a5927669 Mon Sep 17 00:00:00 2001 From: PM_Extra Date: Sat, 3 Dec 2016 01:40:52 +0800 Subject: [PATCH] fixed compilation error in clang before version 8 (does not support thread_local keyword) --- include/spdlog/details/os.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/spdlog/details/os.h b/include/spdlog/details/os.h index a4e467cf..31d880b7 100644 --- a/include/spdlog/details/os.h +++ b/include/spdlog/details/os.h @@ -315,7 +315,7 @@ 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) +#if defined(_MSC_VER) && (_MSC_VER < 1900) || defined(__clang_major__) && (__clang_major__ < 8) return _thread_id(); #else static thread_local const size_t tid = _thread_id();