From 177f40a17c6a340ba7f3499b64f7d872ece15da7 Mon Sep 17 00:00:00 2001 From: Henry Fredrick Schreiner Date: Wed, 18 Apr 2018 13:59:02 +0200 Subject: [PATCH] Dropping optimization for thread local (breaks XCode 7 support) --- include/CLI/TypeTools.hpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/include/CLI/TypeTools.hpp b/include/CLI/TypeTools.hpp index aea4b856..9af8ccaa 100644 --- a/include/CLI/TypeTools.hpp +++ b/include/CLI/TypeTools.hpp @@ -137,15 +137,7 @@ template ::value, detail::enabler> = detail::dummy> bool lexical_cast(std::string input, T &output) { - -// On GCC 4.7, thread_local is not available, so this optimization -// is turned off (avoiding multiple initialisations on multiple usages) -#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER) && __GNUC__ == 4 && (__GNUC_MINOR__ < 8) std::istringstream is; -#else - static thread_local std::istringstream is; - is.clear(); -#endif is.str(input); is >> output;