aboutsummaryrefslogtreecommitdiff
path: root/butl/config
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-01-24 08:10:58 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-01-24 08:10:58 +0200
commit2fcb8f32f339f3a3cb550f10f565d6072f565012 (patch)
tree1124a256ba5fe1f66272b781a99374c4c688e3d7 /butl/config
parentf29c9a5a0cdca0205f98d55ad20d1145295db126 (diff)
Redo config as feature test macros
Diffstat (limited to 'butl/config')
-rw-r--r--butl/config52
1 files changed, 0 insertions, 52 deletions
diff --git a/butl/config b/butl/config
deleted file mode 100644
index 0a5169f..0000000
--- a/butl/config
+++ /dev/null
@@ -1,52 +0,0 @@
-// file : butl/config -*- C++ -*-
-// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
-// license : MIT; see accompanying LICENSE file
-
-#ifndef BUTL_CONFIG
-#define BUTL_CONFIG
-
-#include <cstddef> // _LIBCPP_VERSION, __GLIBCXX__
-
-// thread_local
-//
-// If this macro is undefined then we assume one can use __thread but only
-// for values that do not require dynamic (runtime) initialization.
-//
-// Apparently Apple's Clang "temporarily disabled" C++11 thread_local
-// until they can implement a "fast" version, which reportedly happened in
-// XCode 8. So for now we will continue using __thread for this target.
-//
-#ifdef __apple_build_version__
-# if __apple_build_version__ >= 8000000
-# define BUTL_CXX11_THREAD_LOCAL
-# endif
-#else
-# define BUTL_CXX11_THREAD_LOCAL
-#endif
-
-// std::uncaught_exceptions()
-//
-// VC has it since 1900 which is the lowest version we support.
-//
-#if defined(_MSC_VER)
-# define BUTL_CXX17_UNCAUGHT_EXCEPTIONS
-//
-// Clang's libc++ seems to have it for a while (but not before 1200) so we
-// assume it's there from 1200 (it doesn't define a feature test macros). But
-// not for MacOS, where it is explicitly marked as unavailable until MacOS
-// 10.12.
-//
-#elif defined(_LIBCPP_VERSION) && _LIBCPP_VERSION >= 1200
-# if !defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) || \
- __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101200
-# define BUTL_CXX17_UNCAUGHT_EXCEPTIONS
-# endif
-//
-// GCC libstdc++ has it since GCC 6 and it defines the feature test macro.
-// We will also use this for any other runtime.
-//
-#elif defined(__cpp_lib_uncaught_exceptions)
-# define BUTL_CXX17_UNCAUGHT_EXCEPTIONS
-#endif
-
-#endif // BUTL_CONFIG