1 // (C) Copyright John Maddock 2001-8.
2 // (C) Copyright Peter Dimov 2001.
3 // (C) Copyright Jens Maurer 2001.
4 // (C) Copyright David Abrahams 2002 - 2003.
5 // (C) Copyright Aleksey Gurtovoy 2002 - 2003.
6 // (C) Copyright Guillaume Melquiond 2002 - 2003.
7 // (C) Copyright Beman Dawes 2003.
8 // (C) Copyright Martin Wille 2003.
9 // Use, modification and distribution are subject to the
10 // Boost Software License, Version 1.0. (See accompanying file
11 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
13 // See http://www.boost.org for most recent version.
15 // Intel compiler setup:
17 #include "boost/config/compiler/common_edg.hpp"
19 #if defined(__INTEL_COMPILER)
20 # define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER
22 # define BOOST_INTEL_CXX_VERSION __ICL
24 # define BOOST_INTEL_CXX_VERSION __ICC
26 # define BOOST_INTEL_CXX_VERSION __ECC
29 // Flags determined by comparing output of 'icpc -dM -E' with and without '-std=c++0x'
30 #if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && (__STDC_HOSTED__ && (BOOST_INTEL_CXX_VERSION <= 1200))) || defined(__GXX_EXPERIMENTAL_CPP0X__)
31 # define BOOST_INTEL_STDCXX0X
33 #if defined(_MSC_VER) && (_MSC_VER >= 1600)
34 # define BOOST_INTEL_STDCXX0X
37 #ifdef BOOST_INTEL_STDCXX0X
38 #define BOOST_COMPILER "Intel C++ C++0x mode version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION)
40 #define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION)
42 #define BOOST_INTEL BOOST_INTEL_CXX_VERSION
44 #if defined(_WIN32) || defined(_WIN64)
45 # define BOOST_INTEL_WIN BOOST_INTEL
47 # define BOOST_INTEL_LINUX BOOST_INTEL
50 #if (BOOST_INTEL_CXX_VERSION <= 500) && defined(_MSC_VER)
51 # define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
52 # define BOOST_NO_TEMPLATE_TEMPLATES
55 #if (BOOST_INTEL_CXX_VERSION <= 600)
57 # if defined(_MSC_VER) && (_MSC_VER <= 1300) // added check for <= VC 7 (Peter Dimov)
59 // Boost libraries assume strong standard conformance unless otherwise
60 // indicated by a config macro. As configured by Intel, the EDG front-end
61 // requires certain compiler options be set to achieve that strong conformance.
62 // Particularly /Qoption,c,--arg_dep_lookup (reported by Kirk Klobe & Thomas Witt)
63 // and /Zc:wchar_t,forScope. See boost-root/tools/build/intel-win32-tools.jam for
64 // details as they apply to particular versions of the compiler. When the
65 // compiler does not predefine a macro indicating if an option has been set,
66 // this config file simply assumes the option has been set.
67 // Thus BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP will not be defined, even if
68 // the compiler option is not enabled.
70 # define BOOST_NO_SWPRINTF
73 // Void returns, 64 bit integrals don't work when emulating VC 6 (Peter Dimov)
75 # if defined(_MSC_VER) && (_MSC_VER <= 1200)
76 # define BOOST_NO_VOID_RETURNS
77 # define BOOST_NO_INTEGRAL_INT64_T
82 #if (BOOST_INTEL_CXX_VERSION <= 710) && defined(_WIN32)
83 # define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS
86 // See http://aspn.activestate.com/ASPN/Mail/Message/boost/1614864
87 #if BOOST_INTEL_CXX_VERSION < 600
88 # define BOOST_NO_INTRINSIC_WCHAR_T
90 // We should test the macro _WCHAR_T_DEFINED to check if the compiler
91 // supports wchar_t natively. *BUT* there is a problem here: the standard
92 // headers define this macro if they typedef wchar_t. Anyway, we're lucky
93 // because they define it without a value, while Intel C++ defines it
94 // to 1. So we can check its value to see if the macro was defined natively
96 // Under UNIX, the situation is exactly the same, but the macro _WCHAR_T
98 # if ((_WCHAR_T_DEFINED + 0) == 0) && ((_WCHAR_T + 0) == 0)
99 # define BOOST_NO_INTRINSIC_WCHAR_T
103 #if defined(__GNUC__) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL)
105 // Figure out when Intel is emulating this gcc bug
106 // (All Intel versions prior to 9.0.26, and versions
107 // later than that if they are set up to emulate gcc 3.2
110 # if ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)) || (BOOST_INTEL < 900) || (__INTEL_COMPILER_BUILD_DATE < 20050912)
111 # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
114 #if (defined(__GNUC__) && (__GNUC__ < 4)) || defined(_WIN32) || (BOOST_INTEL_CXX_VERSION <= 1200)
115 // GCC or VC emulation:
116 #define BOOST_NO_TWO_PHASE_NAME_LOOKUP
119 // Verify that we have actually got BOOST_NO_INTRINSIC_WCHAR_T
120 // set correctly, if we don't do this now, we will get errors later
121 // in type_traits code among other things, getting this correct
122 // for the Intel compiler is actually remarkably fragile and tricky:
125 #if defined(BOOST_NO_INTRINSIC_WCHAR_T)
127 template< typename T > struct assert_no_intrinsic_wchar_t;
128 template<> struct assert_no_intrinsic_wchar_t<wchar_t> { typedef void type; };
129 // if you see an error here then you need to unset BOOST_NO_INTRINSIC_WCHAR_T
130 // where it is defined above:
131 typedef assert_no_intrinsic_wchar_t<unsigned short>::type assert_no_intrinsic_wchar_t_;
133 template< typename T > struct assert_intrinsic_wchar_t;
134 template<> struct assert_intrinsic_wchar_t<wchar_t> {};
135 // if you see an error here then define BOOST_NO_INTRINSIC_WCHAR_T on the command line:
136 template<> struct assert_intrinsic_wchar_t<unsigned short> {};
140 #if defined(_MSC_VER) && (_MSC_VER+0 >= 1000)
141 # if _MSC_VER >= 1200
142 # define BOOST_HAS_MS_INT64
144 # define BOOST_NO_SWPRINTF
145 # define BOOST_NO_TWO_PHASE_NAME_LOOKUP
146 #elif defined(_WIN32)
147 # define BOOST_DISABLE_WIN32
150 // I checked version 6.0 build 020312Z, it implements the NRVO.
151 // Correct this as you find out which version of the compiler
152 // implemented the NRVO first. (Daniel Frey)
153 #if (BOOST_INTEL_CXX_VERSION >= 600)
154 # define BOOST_HAS_NRVO
159 // we don't support Intel prior to version 5.0:
160 #if BOOST_INTEL_CXX_VERSION < 500
161 # error "Compiler not supported or configured - please reconfigure"
164 // Intel on MacOS requires
165 #if defined(__APPLE__) && defined(__INTEL_COMPILER)
166 # define BOOST_NO_TWO_PHASE_NAME_LOOKUP
169 // Intel on Altix Itanium
170 #if defined(__itanium__) && defined(__INTEL_COMPILER)
171 # define BOOST_NO_TWO_PHASE_NAME_LOOKUP
175 // An attempt to value-initialize a pointer-to-member may trigger an
176 // internal error on Intel <= 11.1 (last checked version), as was
177 // reported by John Maddock, Intel support issue 589832, May 2010.
178 // Moreover, according to test results from Huang-Vista-x86_32_intel,
179 // intel-vc9-win-11.1 may leave a non-POD array uninitialized, in some
180 // cases when it should be value-initialized.
181 // (Niels Dekker, LKEB, May 2010)
182 // Apparently Intel 12.1 (compiler version number 9999 !!) has the same issue (compiler regression).
183 #if defined(__INTEL_COMPILER)
184 # if (__INTEL_COMPILER <= 1110) || (__INTEL_COMPILER == 9999)
185 # define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
190 // Dynamic shared object (DSO) and dynamic-link library (DLL) support
192 #if defined(__GNUC__) && (__GNUC__ >= 4)
193 # define BOOST_SYMBOL_EXPORT __attribute__((visibility("default")))
194 # define BOOST_SYMBOL_IMPORT
195 # define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default")))
199 // - ICC added static_assert in 11.0 (first version with C++0x support)
201 #if defined(BOOST_INTEL_STDCXX0X)
202 # undef BOOST_NO_STATIC_ASSERT
204 // These pass our test cases, but aren't officially supported according to:
205 // http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/
207 //# undef BOOST_NO_LAMBDAS
208 //# undef BOOST_NO_DECLTYPE
209 //# undef BOOST_NO_AUTO_DECLARATIONS
210 //# undef BOOST_NO_AUTO_MULTIDECLARATIONS
213 #if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION >= 1200)
214 //# undef BOOST_NO_RVALUE_REFERENCES // Enabling this breaks Filesystem and Exception libraries
215 //# undef BOOST_NO_SCOPED_ENUMS // doesn't really work!!
216 # undef BOOST_NO_DELETED_FUNCTIONS
217 # undef BOOST_NO_DEFAULTED_FUNCTIONS
218 # undef BOOST_NO_LAMBDAS
219 # undef BOOST_NO_DECLTYPE
220 # undef BOOST_NO_AUTO_DECLARATIONS
221 # undef BOOST_NO_AUTO_MULTIDECLARATIONS
224 // icl Version 12.1.0.233 Build 20110811 and possibly some other builds
225 // had an incorrect __INTEL_COMPILER value of 9999. Intel say this has been fixed.
226 #if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION > 1200)
227 # undef BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
228 # undef BOOST_NO_NULLPTR
229 # undef BOOST_NO_RVALUE_REFERENCES
230 # undef BOOST_NO_SFINAE_EXPR
231 # undef BOOST_NO_TEMPLATE_ALIASES
232 # undef BOOST_NO_VARIADIC_TEMPLATES
234 // http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/
235 // continues to list scoped enum support as "Partial"
236 //# undef BOOST_NO_SCOPED_ENUMS
239 #if defined(_MSC_VER) && (_MSC_VER <= 1700)
241 // Although the Intel compiler is capable of supporting these, it appears not to in MSVC compatibility mode:
243 # define BOOST_NO_INITIALIZER_LISTS
244 # define BOOST_NO_VARIADIC_TEMPLATES
245 # define BOOST_NO_DELETED_FUNCTIONS
246 # define BOOST_NO_DEFAULTED_FUNCTIONS
247 # define BOOST_NO_TEMPLATE_ALIASES
250 #if (BOOST_INTEL_CXX_VERSION < 1200)
252 // fenv.h appears not to work with Intel prior to 12.0:
254 # define BOOST_NO_FENV_H
258 // last known and checked version:
259 #if (BOOST_INTEL_CXX_VERSION > 1200)
260 # if defined(BOOST_ASSERT_CONFIG)
261 # error "Unknown compiler version - please run the configure tests and report the results"
262 # elif defined(_MSC_VER)
264 // We don't emit this warning any more, since we have so few
265 // defect macros set anyway (just the one).
267 //# pragma message("Unknown compiler version - please run the configure tests and report the results")