github.com/searKing/golang/go@v1.2.117/os/signal/cgo/include/boost/config/stdlib/libcpp.hpp (about)

     1  //  (C) Copyright Christopher Jefferson 2011.
     2  //  Use, modification and distribution are subject to the
     3  //  Boost Software License, Version 1.0. (See accompanying file
     4  //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
     5  
     6  //  See http://www.boost.org for most recent version.
     7  
     8  //  config for libc++
     9  //  Might need more in here later.
    10  
    11  #if !defined(_LIBCPP_VERSION)
    12  #  include <ciso646>
    13  #  if !defined(_LIBCPP_VERSION)
    14  #      error "This is not libc++!"
    15  #  endif
    16  #endif
    17  
    18  #define BOOST_STDLIB "libc++ version " BOOST_STRINGIZE(_LIBCPP_VERSION)
    19  
    20  #define BOOST_HAS_THREADS
    21  
    22  #ifdef _LIBCPP_HAS_NO_VARIADICS
    23  #    define BOOST_NO_CXX11_HDR_TUPLE
    24  #endif
    25  
    26  // BOOST_NO_CXX11_ALLOCATOR should imply no support for the C++11
    27  // allocator model. The C++11 allocator model requires a conforming
    28  // std::allocator_traits which is only possible with C++11 template
    29  // aliases since members rebind_alloc and rebind_traits require it.
    30  #if defined(_LIBCPP_HAS_NO_TEMPLATE_ALIASES)
    31  #    define BOOST_NO_CXX11_ALLOCATOR
    32  #    define BOOST_NO_CXX11_POINTER_TRAITS
    33  #endif
    34  
    35  #if __cplusplus < 201103
    36  //
    37  // These two appear to be somewhat useable in C++03 mode, there may be others...
    38  //
    39  //#  define BOOST_NO_CXX11_HDR_ARRAY
    40  //#  define BOOST_NO_CXX11_HDR_FORWARD_LIST
    41  
    42  #  define BOOST_NO_CXX11_HDR_CODECVT
    43  #  define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
    44  #  define BOOST_NO_CXX11_HDR_EXCEPTION
    45  #  define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
    46  #  define BOOST_NO_CXX11_HDR_MUTEX
    47  #  define BOOST_NO_CXX11_HDR_RANDOM
    48  #  define BOOST_NO_CXX11_HDR_RATIO
    49  #  define BOOST_NO_CXX11_HDR_REGEX
    50  #  define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
    51  #  define BOOST_NO_CXX11_HDR_THREAD
    52  #  define BOOST_NO_CXX11_HDR_TUPLE
    53  #  define BOOST_NO_CXX11_HDR_TYPEINDEX
    54  #  define BOOST_NO_CXX11_HDR_UNORDERED_MAP
    55  #  define BOOST_NO_CXX11_HDR_UNORDERED_SET
    56  #  define BOOST_NO_CXX11_NUMERIC_LIMITS
    57  #  define BOOST_NO_CXX11_ALLOCATOR
    58  #  define BOOST_NO_CXX11_POINTER_TRAITS
    59  #  define BOOST_NO_CXX11_SMART_PTR
    60  #  define BOOST_NO_CXX11_HDR_FUNCTIONAL
    61  #  define BOOST_NO_CXX11_STD_ALIGN
    62  #  define BOOST_NO_CXX11_ADDRESSOF
    63  #  define BOOST_NO_CXX11_HDR_ATOMIC
    64  #  define BOOST_NO_CXX11_ATOMIC_SMART_PTR
    65  #  define BOOST_NO_CXX11_HDR_CHRONO
    66  #  define BOOST_NO_CXX11_HDR_TYPE_TRAITS
    67  #  define BOOST_NO_CXX11_HDR_FUTURE
    68  #elif _LIBCPP_VERSION < 3700
    69  //
    70  // These appear to be unusable/incomplete so far:
    71  //
    72  #  define BOOST_NO_CXX11_HDR_ATOMIC
    73  #  define BOOST_NO_CXX11_ATOMIC_SMART_PTR
    74  #  define BOOST_NO_CXX11_HDR_CHRONO
    75  #  define BOOST_NO_CXX11_HDR_TYPE_TRAITS
    76  #  define BOOST_NO_CXX11_HDR_FUTURE
    77  #endif
    78  
    79  
    80  #if _LIBCPP_VERSION < 3700
    81  // libc++ uses a non-standard messages_base
    82  #define BOOST_NO_STD_MESSAGES
    83  #endif
    84  
    85  // C++14 features
    86  #if (_LIBCPP_VERSION < 3700) || (__cplusplus <= 201402L)
    87  #  define BOOST_NO_CXX14_STD_EXCHANGE
    88  #endif
    89  
    90  // C++17 features
    91  #if (_LIBCPP_VERSION < 4000) || (__cplusplus <= 201402L)
    92  #  define BOOST_NO_CXX17_STD_APPLY
    93  #  define BOOST_NO_CXX17_HDR_OPTIONAL
    94  #  define BOOST_NO_CXX17_HDR_STRING_VIEW
    95  #  define BOOST_NO_CXX17_HDR_VARIANT
    96  #endif
    97  #if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
    98  #  define BOOST_NO_AUTO_PTR
    99  #endif
   100  #if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE)
   101  #  define BOOST_NO_CXX98_RANDOM_SHUFFLE
   102  #endif
   103  #if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
   104  #  define BOOST_NO_CXX98_BINDERS
   105  #endif
   106  
   107  #if defined(__cplusplus) && defined(__has_include)
   108  #if __has_include(<version>)
   109  #include <version>
   110  
   111  #if !defined(__cpp_lib_execution) || (__cpp_lib_execution < 201603L)
   112  #  define BOOST_NO_CXX17_HDR_EXECUTION
   113  #endif
   114  #if !defined(__cpp_lib_invoke) || (__cpp_lib_invoke < 201411L)
   115  #define BOOST_NO_CXX17_STD_INVOKE
   116  #endif
   117  
   118  #if(_LIBCPP_VERSION < 9000)
   119  // as_writable_bytes is missing.
   120  #  define BOOST_NO_CXX20_HDR_SPAN
   121  #endif
   122  
   123  #else
   124  #define BOOST_NO_CXX17_STD_INVOKE      // Invoke support is incomplete (no invoke_result)
   125  #define BOOST_NO_CXX17_HDR_EXECUTION
   126  #endif
   127  #else
   128  #define BOOST_NO_CXX17_STD_INVOKE      // Invoke support is incomplete (no invoke_result)
   129  #define BOOST_NO_CXX17_HDR_EXECUTION
   130  #endif
   131  
   132  #if _LIBCPP_VERSION < 10000  // What's the correct version check here?
   133  #define BOOST_NO_CXX17_ITERATOR_TRAITS
   134  #endif
   135  
   136  #if (_LIBCPP_VERSION <= 1101) && !defined(BOOST_NO_CXX11_THREAD_LOCAL)
   137  // This is a bit of a sledgehammer, because really it's just libc++abi that has no
   138  // support for thread_local, leading to linker errors such as
   139  // "undefined reference to `__cxa_thread_atexit'".  It is fixed in the
   140  // most recent releases of libc++abi though...
   141  #  define BOOST_NO_CXX11_THREAD_LOCAL
   142  #endif
   143  
   144  #if defined(__linux__) && (_LIBCPP_VERSION < 6000) && !defined(BOOST_NO_CXX11_THREAD_LOCAL)
   145  // After libc++-dev is installed on Trusty, clang++-libc++ almost works,
   146  // except uses of `thread_local` fail with undefined reference to
   147  // `__cxa_thread_atexit`.
   148  //
   149  // clang's libc++abi provides an implementation by deferring to the glibc
   150  // implementation, which may or may not be available (it is not on Trusty).
   151  // clang 4's libc++abi will provide an implementation if one is not in glibc
   152  // though, so thread local support should work with clang 4 and above as long
   153  // as libc++abi is linked in.
   154  #  define BOOST_NO_CXX11_THREAD_LOCAL
   155  #endif
   156  
   157  #if defined(__has_include)
   158  #if !__has_include(<shared_mutex>)
   159  #  define BOOST_NO_CXX14_HDR_SHARED_MUTEX
   160  #elif __cplusplus <= 201103
   161  #  define BOOST_NO_CXX14_HDR_SHARED_MUTEX
   162  #endif
   163  #elif __cplusplus < 201402
   164  #  define BOOST_NO_CXX14_HDR_SHARED_MUTEX
   165  #endif
   166  
   167  #if !defined(BOOST_NO_CXX14_HDR_SHARED_MUTEX) && (_LIBCPP_VERSION < 5000)
   168  #  define BOOST_NO_CXX14_HDR_SHARED_MUTEX
   169  #endif
   170  
   171  #if _LIBCPP_VERSION >= 15000
   172  //
   173  // Unary function is now deprecated in C++11 and later:
   174  //
   175  #if __cplusplus >= 201103L
   176  #define BOOST_NO_CXX98_FUNCTION_BASE
   177  #endif
   178  #endif
   179  
   180  //  --- end ---