First public contribution.
1 // (C) Copyright John Maddock 2001.
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 #define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION)
30 #define BOOST_INTEL BOOST_INTEL_CXX_VERSION
32 #if defined(_WIN32) || defined(_WIN64)
33 # define BOOST_INTEL_WIN BOOST_INTEL
35 # define BOOST_INTEL_LINUX BOOST_INTEL
38 #if (BOOST_INTEL_CXX_VERSION <= 500) && defined(_MSC_VER)
39 # define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
40 # define BOOST_NO_TEMPLATE_TEMPLATES
43 #if (BOOST_INTEL_CXX_VERSION <= 600)
45 # if defined(_MSC_VER) && (_MSC_VER <= 1300) // added check for <= VC 7 (Peter Dimov)
47 // Boost libraries assume strong standard conformance unless otherwise
48 // indicated by a config macro. As configured by Intel, the EDG front-end
49 // requires certain compiler options be set to achieve that strong conformance.
50 // Particularly /Qoption,c,--arg_dep_lookup (reported by Kirk Klobe & Thomas Witt)
51 // and /Zc:wchar_t,forScope. See boost-root/tools/build/intel-win32-tools.jam for
52 // details as they apply to particular versions of the compiler. When the
53 // compiler does not predefine a macro indicating if an option has been set,
54 // this config file simply assumes the option has been set.
55 // Thus BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP will not be defined, even if
56 // the compiler option is not enabled.
58 # define BOOST_NO_SWPRINTF
61 // Void returns, 64 bit integrals don't work when emulating VC 6 (Peter Dimov)
63 # if defined(_MSC_VER) && (_MSC_VER <= 1200)
64 # define BOOST_NO_VOID_RETURNS
65 # define BOOST_NO_INTEGRAL_INT64_T
70 #if (BOOST_INTEL_CXX_VERSION <= 710) && defined(_WIN32)
71 # define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS
74 // See http://aspn.activestate.com/ASPN/Mail/Message/boost/1614864
75 #if BOOST_INTEL_CXX_VERSION < 600
76 # define BOOST_NO_INTRINSIC_WCHAR_T
78 // We should test the macro _WCHAR_T_DEFINED to check if the compiler
79 // supports wchar_t natively. *BUT* there is a problem here: the standard
80 // headers define this macro if they typedef wchar_t. Anyway, we're lucky
81 // because they define it without a value, while Intel C++ defines it
82 // to 1. So we can check its value to see if the macro was defined natively
84 // Under UNIX, the situation is exactly the same, but the macro _WCHAR_T
86 # if ((_WCHAR_T_DEFINED + 0) == 0) && ((_WCHAR_T + 0) == 0)
87 # define BOOST_NO_INTRINSIC_WCHAR_T
91 #if defined(__GNUC__) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL)
93 // Figure out when Intel is emulating this gcc bug
94 // (All Intel versions prior to 9.0.26, and versions
95 // later than that if they are set up to emulate gcc 3.2
98 # if ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)) || (BOOST_INTEL < 900) || (__INTEL_COMPILER_BUILD_DATE < 20050912)
99 # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
104 // Verify that we have actually got BOOST_NO_INTRINSIC_WCHAR_T
105 // set correctly, if we don't do this now, we will get errors later
106 // in type_traits code among other things, getting this correct
107 // for the Intel compiler is actually remarkably fragile and tricky:
109 #if defined(BOOST_NO_INTRINSIC_WCHAR_T)
111 template< typename T > struct assert_no_intrinsic_wchar_t;
112 template<> struct assert_no_intrinsic_wchar_t<wchar_t> { typedef void type; };
113 // if you see an error here then you need to unset BOOST_NO_INTRINSIC_WCHAR_T
114 // where it is defined above:
115 typedef assert_no_intrinsic_wchar_t<unsigned short>::type assert_no_intrinsic_wchar_t_;
117 template< typename T > struct assert_intrinsic_wchar_t;
118 template<> struct assert_intrinsic_wchar_t<wchar_t> {};
119 // if you see an error here then define BOOST_NO_INTRINSIC_WCHAR_T on the command line:
120 template<> struct assert_intrinsic_wchar_t<unsigned short> {};
123 #if _MSC_VER+0 >= 1000
124 # if _MSC_VER >= 1200
125 # define BOOST_HAS_MS_INT64
127 # define BOOST_NO_SWPRINTF
128 #elif defined(_WIN32)
129 # define BOOST_DISABLE_WIN32
132 // I checked version 6.0 build 020312Z, it implements the NRVO.
133 // Correct this as you find out which version of the compiler
134 // implemented the NRVO first. (Daniel Frey)
135 #if (BOOST_INTEL_CXX_VERSION >= 600)
136 # define BOOST_HAS_NRVO
141 // we don't support Intel prior to version 5.0:
142 #if BOOST_INTEL_CXX_VERSION < 500
143 # error "Compiler not supported or configured - please reconfigure"
146 // last known and checked version:
147 #if (BOOST_INTEL_CXX_VERSION > 910)
148 # if defined(BOOST_ASSERT_CONFIG)
149 # error "Unknown compiler version - please run the configure tests and report the results"
150 # elif defined(_MSC_VER)
151 # pragma message("Unknown compiler version - please run the configure tests and report the results")