2 Copyright Rene Rivera 2011-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_LANGUAGE_STDCPP_H
9 #define BOOST_PREDEF_LANGUAGE_STDCPP_H
11 #include <boost/predef/version_number.h>
12 #include <boost/predef/make.h>
15 [heading `BOOST_LANG_STDCPP`]
17 [@http://en.wikipedia.org/wiki/C%2B%2B Standard C++] language.
18 If available, the year of the standard is detected as YYYY.MM.1 from the Epoc date.
19 Because of the way the C++ standardization process works the
20 defined version year will not be the commonly known year of the standard.
21 Specifically the defined versions are:
23 [table Detected Version Number vs. C++ Standard Year
24 [[Detected Version Number] [Standard Year] [C++ Standard]]
25 [[27.11.1] [1998] [ISO/IEC 14882:1998]]
26 [[41.12.1] [2011] [ISO/IEC 14882:2011]]
30 [[__predef_symbol__] [__predef_version__]]
32 [[`__cplusplus`] [__predef_detection__]]
34 [[`__cplusplus`] [YYYY.MM.1]]
38 #define BOOST_LANG_STDCPP BOOST_VERSION_NUMBER_NOT_AVAILABLE
40 #if defined(__cplusplus)
41 # undef BOOST_LANG_STDCPP
42 # if (__cplusplus > 100)
43 # define BOOST_LANG_STDCPP BOOST_PREDEF_MAKE_YYYYMM(__cplusplus)
45 # define BOOST_LANG_STDCPP BOOST_VERSION_NUMBER_AVAILABLE
50 # define BOOST_LANG_STDCPP_AVAILABLE
53 #define BOOST_LANG_STDCPP_NAME "Standard C++"
56 [heading `BOOST_LANG_STDCPPCLI`]
58 [@http://en.wikipedia.org/wiki/C%2B%2B/CLI Standard C++/CLI] language.
59 If available, the year of the standard is detected as YYYY.MM.1 from the Epoc date.
62 [[__predef_symbol__] [__predef_version__]]
64 [[`__cplusplus_cli`] [__predef_detection__]]
66 [[`__cplusplus_cli`] [YYYY.MM.1]]
70 #define BOOST_LANG_STDCPPCLI BOOST_VERSION_NUMBER_NOT_AVAILABLE
72 #if defined(__cplusplus_cli)
73 # undef BOOST_LANG_STDCPPCLI
74 # if (__cplusplus_cli > 100)
75 # define BOOST_LANG_STDCPPCLI BOOST_PREDEF_MAKE_YYYYMM(__cplusplus_cli)
77 # define BOOST_LANG_STDCPPCLI BOOST_VERSION_NUMBER_AVAILABLE
81 #if BOOST_LANG_STDCPPCLI
82 # define BOOST_LANG_STDCPPCLI_AVAILABLE
85 #define BOOST_LANG_STDCPPCLI_NAME "Standard C++/CLI"
88 [heading `BOOST_LANG_STDECPP`]
90 [@http://en.wikipedia.org/wiki/Embedded_C%2B%2B Standard Embedded C++] language.
93 [[__predef_symbol__] [__predef_version__]]
95 [[`__embedded_cplusplus`] [__predef_detection__]]
99 #define BOOST_LANG_STDECPP BOOST_VERSION_NUMBER_NOT_AVAILABLE
101 #if defined(__embedded_cplusplus)
102 # undef BOOST_LANG_STDECPP
103 # define BOOST_LANG_STDECPP BOOST_VERSION_NUMBER_AVAILABLE
106 #if BOOST_LANG_STDECPP
107 # define BOOST_LANG_STDECPP_AVAILABLE
110 #define BOOST_LANG_STDECPP_NAME "Standard Embedded C++"
114 #include <boost/predef/detail/test.h>
115 BOOST_PREDEF_DECLARE_TEST(BOOST_LANG_STDCPP,BOOST_LANG_STDCPP_NAME)
117 #include <boost/predef/detail/test.h>
118 BOOST_PREDEF_DECLARE_TEST(BOOST_LANG_STDCPPCLI,BOOST_LANG_STDCPPCLI_NAME)
120 #include <boost/predef/detail/test.h>
121 BOOST_PREDEF_DECLARE_TEST(BOOST_LANG_STDECPP,BOOST_LANG_STDECPP_NAME)