stdcpp.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /*
  2. Copyright Redshift Software Inc. 2011-2013
  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)
  6. */
  7. #ifndef BOOST_PREDEF_LANGUAGE_STDCPP_H
  8. #define BOOST_PREDEF_LANGUAGE_STDCPP_H
  9. #include <boost/predef/version_number.h>
  10. #include <boost/predef/make.h>
  11. /*`
  12. [heading `BOOST_LANG_STDCPP`]
  13. [@http://en.wikipedia.org/wiki/C%2B%2B Standard C++] language.
  14. If available, the year of the standard is detected as YYYY.MM.1 from the Epoc date.
  15. Because of the way the C++ standardization process works the
  16. defined version year will not be the commonly known year of the standard.
  17. Specifically the defined versions are:
  18. [table Detected Version Number vs. C++ Standard Year
  19. [[Detected Version Number] [Standard Year] [C++ Standard]]
  20. [[27.11.1] [1998] [ISO/IEC 14882:1998]]
  21. [[41.12.1] [2011] [ISO/IEC 14882:2011]]
  22. ]
  23. [table
  24. [[__predef_symbol__] [__predef_version__]]
  25. [[`__cplusplus`] [__predef_detection__]]
  26. [[`__cplusplus`] [YYYY.MM.1]]
  27. ]
  28. */
  29. #define BOOST_LANG_STDCPP BOOST_VERSION_NUMBER_NOT_AVAILABLE
  30. #if defined(__cplusplus)
  31. # undef BOOST_LANG_STDCPP
  32. # if (__cplusplus > 100)
  33. # define BOOST_LANG_STDCPP BOOST_PREDEF_MAKE_YYYYMM(__cplusplus)
  34. # else
  35. # define BOOST_LANG_STDCPP BOOST_VERSION_NUMBER_AVAILABLE
  36. # endif
  37. #endif
  38. #if BOOST_LANG_STDCPP
  39. # define BOOST_LANG_STDCPP_AVAILABLE
  40. #endif
  41. #define BOOST_LANG_STDCPP_NAME "Standard C++"
  42. #include <boost/predef/detail/test.h>
  43. BOOST_PREDEF_DECLARE_TEST(BOOST_LANG_STDCPP,BOOST_LANG_STDCPP_NAME)
  44. /*`
  45. [heading `BOOST_LANG_STDCPPCLI`]
  46. [@http://en.wikipedia.org/wiki/C%2B%2B/CLI Standard C++/CLI] language.
  47. If available, the year of the standard is detected as YYYY.MM.1 from the Epoc date.
  48. [table
  49. [[__predef_symbol__] [__predef_version__]]
  50. [[`__cplusplus_cli`] [__predef_detection__]]
  51. [[`__cplusplus_cli`] [YYYY.MM.1]]
  52. ]
  53. */
  54. #define BOOST_LANG_STDCPPCLI BOOST_VERSION_NUMBER_NOT_AVAILABLE
  55. #if defined(__cplusplus_cli)
  56. # undef BOOST_LANG_STDCPPCLI
  57. # if (__cplusplus_cli > 100)
  58. # define BOOST_LANG_STDCPPCLI BOOST_PREDEF_MAKE_YYYYMM(__cplusplus_cli)
  59. # else
  60. # define BOOST_LANG_STDCPPCLI BOOST_VERSION_NUMBER_AVAILABLE
  61. # endif
  62. #endif
  63. #if BOOST_LANG_STDCPPCLI
  64. # define BOOST_LANG_STDCPPCLI_AVAILABLE
  65. #endif
  66. #define BOOST_LANG_STDCPPCLI_NAME "Standard C++/CLI"
  67. #include <boost/predef/detail/test.h>
  68. BOOST_PREDEF_DECLARE_TEST(BOOST_LANG_STDCPPCLI,BOOST_LANG_STDCPPCLI_NAME)
  69. /*`
  70. [heading `BOOST_LANG_STDECPP`]
  71. [@http://en.wikipedia.org/wiki/Embedded_C%2B%2B Standard Embedded C++] language.
  72. [table
  73. [[__predef_symbol__] [__predef_version__]]
  74. [[`__embedded_cplusplus`] [__predef_detection__]]
  75. ]
  76. */
  77. #define BOOST_LANG_STDECPP BOOST_VERSION_NUMBER_NOT_AVAILABLE
  78. #if defined(__embedded_cplusplus)
  79. # undef BOOST_LANG_STDECPP
  80. # define BOOST_LANG_STDECPP BOOST_VERSION_NUMBER_AVAILABLE
  81. #endif
  82. #if BOOST_LANG_STDECPP
  83. # define BOOST_LANG_STDECPP_AVAILABLE
  84. #endif
  85. #define BOOST_LANG_STDECPP_NAME "Standard Embedded C++"
  86. #include <boost/predef/detail/test.h>
  87. BOOST_PREDEF_DECLARE_TEST(BOOST_LANG_STDECPP,BOOST_LANG_STDECPP_NAME)
  88. #endif