Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:48:05

0001 /*
0002 Copyright Rene Rivera 2008-2015
0003 Distributed under the Boost Software License, Version 1.0.
0004 (See accompanying file LICENSE_1_0.txt or copy at
0005 http://www.boost.org/LICENSE_1_0.txt)
0006 */
0007 
0008 #ifndef BOOST_PREDEF_COMPILER_VISUALC_H
0009 #define BOOST_PREDEF_COMPILER_VISUALC_H
0010 
0011 /* Other compilers that emulate this one need to be detected first. */
0012 
0013 #include <boost/predef/compiler/clang.h>
0014 
0015 #include <boost/predef/version_number.h>
0016 #include <boost/predef/make.h>
0017 
0018 /* tag::reference[]
0019 = `BOOST_COMP_MSVC`
0020 
0021 http://en.wikipedia.org/wiki/Visual_studio[Microsoft Visual C/{CPP}] compiler.
0022 Version number available as major, minor, and patch.
0023 
0024 [options="header"]
0025 |===
0026 | {predef_symbol} | {predef_version}
0027 
0028 | `+_MSC_VER+` | {predef_detection}
0029 
0030 | `+_MSC_FULL_VER+` | V.R.P
0031 | `+_MSC_VER+` | V.R.0
0032 |===
0033 
0034 NOTE: Release of Visual Studio after 2015 will no longer be identified
0035 by Boost Predef as the marketing version number. Instead we use the
0036 compiler version number directly, i.e. the _MSC_VER number.
0037 */ // end::reference[]
0038 
0039 #define BOOST_COMP_MSVC BOOST_VERSION_NUMBER_NOT_AVAILABLE
0040 
0041 #if defined(_MSC_VER)
0042 #   if !defined (_MSC_FULL_VER)
0043 #       define BOOST_COMP_MSVC_BUILD 0
0044 #   else
0045         /* how many digits does the build number have? */
0046 #       if _MSC_FULL_VER / 10000 == _MSC_VER
0047             /* four digits */
0048 #           define BOOST_COMP_MSVC_BUILD (_MSC_FULL_VER % 10000)
0049 #       elif _MSC_FULL_VER / 100000 == _MSC_VER
0050             /* five digits */
0051 #           define BOOST_COMP_MSVC_BUILD (_MSC_FULL_VER % 100000)
0052 #       else
0053 #           error "Cannot determine build number from _MSC_FULL_VER"
0054 #       endif
0055 #   endif
0056     /*
0057     VS2014 was skipped in the release sequence for MS. Which
0058     means that the compiler and VS product versions are no longer
0059     in sync. Hence we need to use different formulas for
0060     mapping from MSC version to VS product version.
0061 
0062     VS2017 is a total nightmare when it comes to version numbers.
0063     Hence to avoid arguments relating to that both present and
0064     future.. Any version after VS2015 will use solely the compiler
0065     version, i.e. cl.exe, as the version number here.
0066     */
0067 #   if (_MSC_VER > 1900)
0068 #       define BOOST_COMP_MSVC_DETECTION BOOST_VERSION_NUMBER(\
0069             _MSC_VER/100,\
0070             _MSC_VER%100,\
0071             BOOST_COMP_MSVC_BUILD)
0072 #   elif (_MSC_VER >= 1900)
0073 #       define BOOST_COMP_MSVC_DETECTION BOOST_VERSION_NUMBER(\
0074             _MSC_VER/100-5,\
0075             _MSC_VER%100,\
0076             BOOST_COMP_MSVC_BUILD)
0077 #   else
0078 #       define BOOST_COMP_MSVC_DETECTION BOOST_VERSION_NUMBER(\
0079             _MSC_VER/100-6,\
0080             _MSC_VER%100,\
0081             BOOST_COMP_MSVC_BUILD)
0082 #   endif
0083 #endif
0084 
0085 #ifdef BOOST_COMP_MSVC_DETECTION
0086 #   if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED)
0087 #       define BOOST_COMP_MSVC_EMULATED BOOST_COMP_MSVC_DETECTION
0088 #   else
0089 #       undef BOOST_COMP_MSVC
0090 #       define BOOST_COMP_MSVC BOOST_COMP_MSVC_DETECTION
0091 #   endif
0092 #   define BOOST_COMP_MSVC_AVAILABLE
0093 #   include <boost/predef/detail/comp_detected.h>
0094 #endif
0095 
0096 #define BOOST_COMP_MSVC_NAME "Microsoft Visual C/C++"
0097 
0098 #endif
0099 
0100 #include <boost/predef/detail/test.h>
0101 BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MSVC,BOOST_COMP_MSVC_NAME)
0102 
0103 #ifdef BOOST_COMP_MSVC_EMULATED
0104 #include <boost/predef/detail/test.h>
0105 BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MSVC_EMULATED,BOOST_COMP_MSVC_NAME)
0106 #endif