]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/type_traits/detail/config.hpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / boost / type_traits / detail / config.hpp
1
2 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
3 // Use, modification and distribution are subject to the Boost Software License,
4 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt).
6 //
7 // See http://www.boost.org/libs/type_traits for most recent version including documentation.
8
9 #ifndef BOOST_TT_CONFIG_HPP_INCLUDED
10 #define BOOST_TT_CONFIG_HPP_INCLUDED
11
12 #ifndef BOOST_CONFIG_HPP
13 #include <boost/config.hpp>
14 #endif
15 #include <boost/version.hpp>
16 #include <boost/config/workaround.hpp>
17
18 //
19 // whenever we have a conversion function with ellipses
20 // it needs to be declared __cdecl to suppress compiler
21 // warnings from MS and Borland compilers (this *must*
22 // appear before we include is_same.hpp below):
23 #if defined(BOOST_MSVC) || (defined(BOOST_BORLANDC) && !defined(BOOST_DISABLE_WIN32))
24 # define BOOST_TT_DECL __cdecl
25 #else
26 # define BOOST_TT_DECL /**/
27 #endif
28
29 # if (BOOST_WORKAROUND(__MWERKS__, < 0x3000) \
30 || BOOST_WORKAROUND(__IBMCPP__, < 600 ) \
31 || BOOST_WORKAROUND(BOOST_BORLANDC, < 0x5A0) \
32 || defined(__ghs) \
33 || BOOST_WORKAROUND(__HP_aCC, < 60700) \
34 || BOOST_WORKAROUND(MPW_CPLUS, BOOST_TESTED_AT(0x890)) \
35 || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x580))) \
36 && defined(BOOST_NO_IS_ABSTRACT)
37
38 # define BOOST_TT_NO_CONFORMING_IS_CLASS_IMPLEMENTATION 1
39
40 #endif
41
42 #ifndef BOOST_TT_NO_CONFORMING_IS_CLASS_IMPLEMENTATION
43 # define BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION 1
44 #endif
45
46 //
47 // define BOOST_TT_TEST_MS_FUNC_SIGS
48 // when we want to test __stdcall etc function types with is_function etc
49 // (Note, does not work with Borland, even though it does support __stdcall etc):
50 //
51 #if defined(_MSC_EXTENSIONS) && !defined(BOOST_BORLANDC)
52 # define BOOST_TT_TEST_MS_FUNC_SIGS
53 #endif
54
55 //
56 // define BOOST_TT_NO_CV_FUNC_TEST
57 // if tests for cv-qualified member functions don't
58 // work in is_member_function_pointer
59 //
60 #if BOOST_WORKAROUND(__MWERKS__, < 0x3000) || BOOST_WORKAROUND(__IBMCPP__, <= 600)
61 # define BOOST_TT_NO_CV_FUNC_TEST
62 #endif
63
64 //
65 // Macros that have been deprecated, defined here for backwards compatibility:
66 //
67 #define BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(x)
68 #define BOOST_TT_BROKEN_COMPILER_SPEC(x)
69
70 //
71 // Can we implement "accurate" binary operator detection:
72 //
73 #if !defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1900) && !BOOST_WORKAROUND(BOOST_GCC, < 40900)
74 # define BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION
75 #endif
76
77 #if defined(__clang__) && (__clang_major__ == 3) && (__clang_minor__ < 2) && defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
78 #undef BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION
79 #endif
80
81 //
82 // Can we implement accurate is_function/is_member_function_pointer (post C++03)?
83 //
84 #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !BOOST_WORKAROUND(BOOST_GCC, < 40805)\
85 && !BOOST_WORKAROUND(BOOST_MSVC, < 1900) && !BOOST_WORKAROUND(__clang_major__, <= 4)
86 # define BOOST_TT_HAS_ASCCURATE_IS_FUNCTION
87 #endif
88
89 #if defined(_MSVC_LANG) && (_MSVC_LANG >= 201703)
90 # define BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM
91 #endif
92 #if defined(__APPLE_CC__) && defined(__clang_major__) && (__clang_major__ == 9) && (__clang_minor__ == 0)
93 # define BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM
94 # define BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE
95 #endif
96 //
97 // If we have the SD6 macros (check for C++11's __cpp_rvalue_references), and we don't have __cpp_noexcept_function_type
98 // set, then don't treat noexcept functions as seperate types. This is a fix for msvc with the /Zc:noexceptTypes- flag set.
99 //
100 #if defined(__cpp_rvalue_references) && !defined(__cpp_noexcept_function_type) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE)
101 # define BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE
102 #endif
103 //
104 // Check MSVC specific macro on older msvc compilers that don't support the SD6 macros, we don't rely on this
105 // if the SD6 macros *are* available as it appears to be undocumented.
106 //
107 #if defined(BOOST_MSVC) && !defined(__cpp_rvalue_references) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE) && !defined(_NOEXCEPT_TYPES_SUPPORTED)
108 # define BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE
109 #endif
110
111 #endif // BOOST_TT_CONFIG_HPP_INCLUDED
112
113