如this answer所示,Mac上的Xcode clang即使设置了C++11标志也不支持C++11存储。即使在最新版本中,Apple版本7.0.0 (clang-700.1.76),Target: x86_64-apple-darwin15.0.0,线程模型: posix,不支持thread_local。
../../src/dir/sysArch.h:1505:3: error: thread-local storage is not supported
for the current target
thread_local
^发布于 2017-04-29 19:14:50
Xcode 8(及更高版本)提供的clang版本支持thread_local关键字;请参见讨论here。
https://stackoverflow.com/questions/33358417
复制相似问题