2011-11-19 03:46:41 +00:00
|
|
|
/*
|
2015-07-01 17:19:29 -05:00
|
|
|
Copyright Rene Rivera 2011-2015
|
2011-11-19 03:46:41 +00:00
|
|
|
Distributed under the Boost Software License, Version 1.0.
|
|
|
|
|
(See accompanying file LICENSE_1_0.txt or copy at
|
|
|
|
|
http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef BOOST_PREDEF_LANGUAGE_STDCPP_H
|
|
|
|
|
#define BOOST_PREDEF_LANGUAGE_STDCPP_H
|
|
|
|
|
|
|
|
|
|
#include <boost/predef/version_number.h>
|
|
|
|
|
#include <boost/predef/make.h>
|
|
|
|
|
|
2019-12-31 16:14:17 -06:00
|
|
|
/* tag::reference[]
|
|
|
|
|
= `BOOST_LANG_STDCPP`
|
2011-11-19 03:46:41 +00:00
|
|
|
|
2019-12-31 16:14:17 -06:00
|
|
|
http://en.wikipedia.org/wiki/C%2B%2B[Standard {CPP}] language.
|
2021-05-21 15:30:36 +01:00
|
|
|
If available, the year of the standard is detected as YYYY.MM.1 from the Epoch date.
|
2019-12-31 16:14:17 -06:00
|
|
|
Because of the way the {CPP} standardization process works the
|
2013-01-10 23:23:37 -06:00
|
|
|
defined version year will not be the commonly known year of the standard.
|
2011-12-01 04:04:07 +00:00
|
|
|
Specifically the defined versions are:
|
2011-11-30 05:54:23 +00:00
|
|
|
|
2019-12-31 16:14:17 -06:00
|
|
|
.Detected Version Number vs. {CPP} Standard Year
|
|
|
|
|
[options="header"]
|
|
|
|
|
|===
|
|
|
|
|
| Detected Version Number | Standard Year | {CPP} Standard
|
|
|
|
|
| 27.11.1 | 1998 | ISO/IEC 14882:1998
|
2020-02-28 23:35:01 -06:00
|
|
|
| 41.3.1 | 2011 | ISO/IEC 14882:2011
|
|
|
|
|
| 44.2.1 | 2014 | ISO/IEC 14882:2014
|
|
|
|
|
| 47.3.1 | 2017 | ISO/IEC 14882:2017
|
2019-12-31 16:14:17 -06:00
|
|
|
|===
|
2012-07-15 03:37:23 +00:00
|
|
|
|
2019-12-31 16:14:17 -06:00
|
|
|
[options="header"]
|
|
|
|
|
|===
|
|
|
|
|
| {predef_symbol} | {predef_version}
|
2012-07-15 03:37:23 +00:00
|
|
|
|
2019-12-31 16:14:17 -06:00
|
|
|
| `+__cplusplus+` | {predef_detection}
|
2012-07-15 03:37:23 +00:00
|
|
|
|
2019-12-31 16:14:17 -06:00
|
|
|
| `+__cplusplus+` | YYYY.MM.1
|
|
|
|
|
|===
|
|
|
|
|
*/ // end::reference[]
|
2011-11-19 03:46:41 +00:00
|
|
|
|
2013-01-18 21:25:30 -06:00
|
|
|
#define BOOST_LANG_STDCPP BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
2011-11-19 03:46:41 +00:00
|
|
|
|
|
|
|
|
#if defined(__cplusplus)
|
2012-07-15 03:37:23 +00:00
|
|
|
# undef BOOST_LANG_STDCPP
|
|
|
|
|
# if (__cplusplus > 100)
|
2013-01-03 21:37:59 -06:00
|
|
|
# define BOOST_LANG_STDCPP BOOST_PREDEF_MAKE_YYYYMM(__cplusplus)
|
2012-07-15 03:37:23 +00:00
|
|
|
# else
|
2013-01-18 21:25:30 -06:00
|
|
|
# define BOOST_LANG_STDCPP BOOST_VERSION_NUMBER_AVAILABLE
|
2012-07-15 03:37:23 +00:00
|
|
|
# endif
|
2011-11-19 03:46:41 +00:00
|
|
|
#endif
|
|
|
|
|
|
2013-01-18 21:25:30 -06:00
|
|
|
#if BOOST_LANG_STDCPP
|
|
|
|
|
# define BOOST_LANG_STDCPP_AVAILABLE
|
|
|
|
|
#endif
|
|
|
|
|
|
2012-07-15 03:37:23 +00:00
|
|
|
#define BOOST_LANG_STDCPP_NAME "Standard C++"
|
|
|
|
|
|
2019-12-31 16:14:17 -06:00
|
|
|
/* tag::reference[]
|
|
|
|
|
= `BOOST_LANG_STDCPPCLI`
|
2011-11-19 03:46:41 +00:00
|
|
|
|
2019-12-31 16:14:17 -06:00
|
|
|
http://en.wikipedia.org/wiki/C%2B%2B/CLI[Standard {CPP}/CLI] language.
|
2021-05-21 15:30:36 +01:00
|
|
|
If available, the year of the standard is detected as YYYY.MM.1 from the Epoch date.
|
2013-01-10 23:23:37 -06:00
|
|
|
|
2019-12-31 16:14:17 -06:00
|
|
|
[options="header"]
|
|
|
|
|
|===
|
|
|
|
|
| {predef_symbol} | {predef_version}
|
2013-01-10 23:23:37 -06:00
|
|
|
|
2019-12-31 16:14:17 -06:00
|
|
|
| `+__cplusplus_cli+` | {predef_detection}
|
2013-01-10 23:23:37 -06:00
|
|
|
|
2019-12-31 16:14:17 -06:00
|
|
|
| `+__cplusplus_cli+` | YYYY.MM.1
|
|
|
|
|
|===
|
|
|
|
|
*/ // end::reference[]
|
2011-11-19 03:46:41 +00:00
|
|
|
|
2013-01-18 21:25:30 -06:00
|
|
|
#define BOOST_LANG_STDCPPCLI BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
2011-11-19 03:46:41 +00:00
|
|
|
|
|
|
|
|
#if defined(__cplusplus_cli)
|
2012-07-15 03:37:23 +00:00
|
|
|
# undef BOOST_LANG_STDCPPCLI
|
|
|
|
|
# if (__cplusplus_cli > 100)
|
2013-01-03 21:37:59 -06:00
|
|
|
# define BOOST_LANG_STDCPPCLI BOOST_PREDEF_MAKE_YYYYMM(__cplusplus_cli)
|
2012-07-15 03:37:23 +00:00
|
|
|
# else
|
2013-01-18 21:25:30 -06:00
|
|
|
# define BOOST_LANG_STDCPPCLI BOOST_VERSION_NUMBER_AVAILABLE
|
2012-07-15 03:37:23 +00:00
|
|
|
# endif
|
2011-11-19 03:46:41 +00:00
|
|
|
#endif
|
|
|
|
|
|
2013-01-18 21:25:30 -06:00
|
|
|
#if BOOST_LANG_STDCPPCLI
|
|
|
|
|
# define BOOST_LANG_STDCPPCLI_AVAILABLE
|
|
|
|
|
#endif
|
|
|
|
|
|
2012-07-15 03:37:23 +00:00
|
|
|
#define BOOST_LANG_STDCPPCLI_NAME "Standard C++/CLI"
|
|
|
|
|
|
2019-12-31 16:14:17 -06:00
|
|
|
/* tag::reference[]
|
|
|
|
|
= `BOOST_LANG_STDECPP`
|
2011-11-19 03:46:41 +00:00
|
|
|
|
2019-12-31 16:14:17 -06:00
|
|
|
http://en.wikipedia.org/wiki/Embedded_C%2B%2B[Standard Embedded {CPP}] language.
|
2013-01-10 23:23:37 -06:00
|
|
|
|
2019-12-31 16:14:17 -06:00
|
|
|
[options="header"]
|
|
|
|
|
|===
|
|
|
|
|
| {predef_symbol} | {predef_version}
|
2013-01-10 23:23:37 -06:00
|
|
|
|
2019-12-31 16:14:17 -06:00
|
|
|
| `+__embedded_cplusplus+` | {predef_detection}
|
|
|
|
|
|===
|
|
|
|
|
*/ // end::reference[]
|
2011-11-19 03:46:41 +00:00
|
|
|
|
2013-01-18 21:25:30 -06:00
|
|
|
#define BOOST_LANG_STDECPP BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
2011-11-19 03:46:41 +00:00
|
|
|
|
|
|
|
|
#if defined(__embedded_cplusplus)
|
2012-07-15 03:37:23 +00:00
|
|
|
# undef BOOST_LANG_STDECPP
|
2013-01-18 21:25:30 -06:00
|
|
|
# define BOOST_LANG_STDECPP BOOST_VERSION_NUMBER_AVAILABLE
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if BOOST_LANG_STDECPP
|
|
|
|
|
# define BOOST_LANG_STDECPP_AVAILABLE
|
2011-11-19 03:46:41 +00:00
|
|
|
#endif
|
|
|
|
|
|
2012-07-15 03:37:23 +00:00
|
|
|
#define BOOST_LANG_STDECPP_NAME "Standard Embedded C++"
|
|
|
|
|
|
2015-06-29 18:49:33 -05:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#include <boost/predef/detail/test.h>
|
|
|
|
|
BOOST_PREDEF_DECLARE_TEST(BOOST_LANG_STDCPP,BOOST_LANG_STDCPP_NAME)
|
|
|
|
|
|
|
|
|
|
#include <boost/predef/detail/test.h>
|
|
|
|
|
BOOST_PREDEF_DECLARE_TEST(BOOST_LANG_STDCPPCLI,BOOST_LANG_STDCPPCLI_NAME)
|
|
|
|
|
|
2011-11-19 03:46:41 +00:00
|
|
|
#include <boost/predef/detail/test.h>
|
2012-07-15 03:37:23 +00:00
|
|
|
BOOST_PREDEF_DECLARE_TEST(BOOST_LANG_STDECPP,BOOST_LANG_STDECPP_NAME)
|