]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/predef/include/boost/predef/compiler/visualc.h
2 Copyright Rene Rivera 2008-2015
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE_1_0.txt or copy at
5 http://www.boost.org/LICENSE_1_0.txt)
8 #ifndef BOOST_PREDEF_COMPILER_VISUALC_H
9 #define BOOST_PREDEF_COMPILER_VISUALC_H
11 /* Other compilers that emulate this one need to be detected first. */
13 #include <boost/predef/compiler/clang.h>
15 #include <boost/predef/version_number.h>
16 #include <boost/predef/make.h>
19 [heading `BOOST_COMP_MSVC`]
21 [@http://en.wikipedia.org/wiki/Visual_studio Microsoft Visual C/C++] compiler.
22 Version number available as major, minor, and patch.
25 [[__predef_symbol__] [__predef_version__]]
27 [[`_MSC_VER`] [__predef_detection__]]
29 [[`_MSC_FULL_VER`] [V.R.P]]
30 [[`_MSC_VER`] [V.R.0]]
34 #define BOOST_COMP_MSVC BOOST_VERSION_NUMBER_NOT_AVAILABLE
37 # if !defined (_MSC_FULL_VER)
38 # define BOOST_COMP_MSVC_BUILD 0
40 /* how many digits does the build number have? */
41 # if _MSC_FULL_VER / 10000 == _MSC_VER
43 # define BOOST_COMP_MSVC_BUILD (_MSC_FULL_VER % 10000)
44 # elif _MSC_FULL_VER / 100000 == _MSC_VER
46 # define BOOST_COMP_MSVC_BUILD (_MSC_FULL_VER % 100000)
48 # error "Cannot determine build number from _MSC_FULL_VER"
52 VS2014 was skipped in the release sequence for MS. Which
53 means that the compiler and VS product versions are no longer
54 in sync. Hence we need to use different formulas for
55 mapping from MSC version to VS product version.
57 # if (_MSC_VER >= 1900)
58 # define BOOST_COMP_MSVC_DETECTION BOOST_VERSION_NUMBER(\
61 BOOST_COMP_MSVC_BUILD)
63 # define BOOST_COMP_MSVC_DETECTION BOOST_VERSION_NUMBER(\
66 BOOST_COMP_MSVC_BUILD)
70 #ifdef BOOST_COMP_MSVC_DETECTION
71 # if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED)
72 # define BOOST_COMP_MSVC_EMULATED BOOST_COMP_MSVC_DETECTION
74 # undef BOOST_COMP_MSVC
75 # define BOOST_COMP_MSVC BOOST_COMP_MSVC_DETECTION
77 # define BOOST_COMP_MSVC_AVAILABLE
78 # include <boost/predef/detail/comp_detected.h>
81 #define BOOST_COMP_MSVC_NAME "Microsoft Visual C/C++"
85 #include <boost/predef/detail/test.h>
86 BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MSVC
,BOOST_COMP_MSVC_NAME
)
88 #ifdef BOOST_COMP_MSVC_EMULATED
89 #include <boost/predef/detail/test.h>
90 BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MSVC_EMULATED
,BOOST_COMP_MSVC_NAME
)