8#ifndef INCLUDED_BSLS_COMPILERFEATURES
9#define INCLUDED_BSLS_COMPILERFEATURES
1343#include <bsls_platform.h>
1347 #if __has_include(<version>)
1356#ifndef BDE_BUILD_SKIP_VERSION_CHECKS
1359 #if __cplusplus > 201703L || (defined(_MSVC_LANG) && _MSVC_LANG > 201703L)
1360 #if defined(BSLS_PLATFORM_CMP_GNU) && BSLS_PLATFORM_CMP_VERSION < 110100
1361 static_assert(0,
"At least version 11.1 is required for C++20 support "
1362 "in GNU CC g++. This check can be disabled by defining the "
1363 "'BDE_BUILD_SKIP_VERSION_CHECKS' build flag.");
1366 #if defined(BSLS_PLATFORM_CMP_CLANG) && BSLS_PLATFORM_CMP_VERSION < 150000
1367 static_assert(0,
"At least version 15.0 is required for C++20 support "
1368 "in LLVM clang. This check can be disabled by defining the "
1369 "'BDE_BUILD_SKIP_VERSION_CHECKS' build flag.");
1372 #if defined(BSLS_PLATFORM_CMP_MSVC) && BSLS_PLATFORM_CMP_VERSION < 1930
1373 static_assert(0,
"At least version 19.30 is required for C++20 support "
1374 "in MS Visual C++ (MS Visual Studio 2022). This check can be "
1375 "disabled by defining build flag 'BDE_BUILD_SKIP_VERSION_CHECKS'.");
1378 #if defined(BSLS_PLATFORM_CMP_IBM) || defined(BSLS_PLATFORM_CMP_SUN)
1379 #error "This compiler does not support C++20. This check can be " \
1380 "disabled by defining the 'BDE_BUILD_SKIP_VERSION_CHECKS' build "\
1382"http://bloomberg.github.io/bde/library_information/supported_platforms.html "\
1383 "for all compiler and other platform requirements."
1393#if defined(__cplusplus)
1394 #define BSLS_COMPILERFEATURES_CPLUSPLUS __cplusplus
1396 #define BSLS_COMPILERFEATURES_CPLUSPLUS 199711L
1403#define BSLS_COMPILERFEATURES_SUPPORT_THROW_SPECIFICATIONS 1
1410#if defined(__cpp_guaranteed_copy_elision)
1411 #define BSLS_COMPILERFEATURES_GUARANTEED_COPY_ELISION 1
1414#if defined(__cpp_unicode_characters) && defined(__cpp_unicode_literals)
1415 #define BSLS_COMPILERFEATURES_SUPPORT_UNICODE_CHAR_TYPES 1
1418#if defined(__cpp_char8_t)
1419 #define BSLS_COMPILERFEATURES_SUPPORT_UTF8_CHAR_TYPE 1
1422#if defined(__cpp_hex_float)
1423 #define BSLS_COMPILERFEATURES_SUPPORT_HEXFLOAT_LITERALS 1
1426#if defined(__cpp_impl_coroutine) && __cpp_impl_coroutine >= 201902L
1436 #define BSLS_COMPILERFEATURES_SUPPORT_COROUTINE 1
1439#if defined(__cpp_deduction_guides) && __cpp_deduction_guides >= 201611
1440 #define BSLS_COMPILERFEATURES_SUPPORT_CTAD 1
1443#if defined(__cpp_concepts) && __cpp_concepts >= 202002L
1444 #define BSLS_COMPILERFEATURES_SUPPORT_CONCEPTS 1
1447#if defined(__cpp_static_call_operator) && \
1448 __cpp_static_call_operator >= 202207L
1449 #define BSLS_COMPILERFEATURES_SUPPORT_STATIC_CALL_OPERATOR 1
1452#if defined(__cpp_lib_hardware_interference_size) && \
1453 __cpp_lib_hardware_interference_size >= 201703L
1454 #define BSLS_COMPILERFEATURES_SUPPORT_HARDWARE_INTERFERENCE 1
1460#if __cplusplus > 201703L || (defined(_MSVC_LANG) && _MSVC_LANG > 201703L)
1462 #if defined(__cpp_constexpr) && __cpp_constexpr >= 201907L
1463 #if defined(__cpp_constexpr_dynamic_alloc) && \
1464 __cpp_constexpr_dynamic_alloc >= 201907L
1465 #define BSLS_COMPILERFEATURES_SUPPORT_CONSTEXPR_CPP20 1
1468 #if defined(__cpp_consteval) && __cpp_consteval >= 201811L
1469 #define BSLS_COMPILERFEATURES_SUPPORT_CONSTEVAL_CPP20 1
1476#if defined(__cpp_impl_three_way_comparison) && \
1477 __cpp_impl_three_way_comparison >= 201907L
1478 #if defined(__cpp_lib_three_way_comparison) && \
1479 __cpp_lib_three_way_comparison >= 201907L
1480 #define BSLS_COMPILERFEATURES_SUPPORT_THREE_WAY_COMPARISON 1
1488#if (__cplusplus >= 201103L) && defined(__has_cpp_attribute)
1490 #if __has_cpp_attribute(fallthrough)
1491 #define BSLS_COMPILERFEATURES_SUPPORT_ATTRIBUTE_FALLTHROUGH 1
1494 #if __has_cpp_attribute(noreturn)
1495 #define BSLS_COMPILERFEATURES_SUPPORT_ATTRIBUTE_NORETURN 1
1498 #if __has_cpp_attribute(nodiscard)
1499 #define BSLS_COMPILERFEATURES_SUPPORT_ATTRIBUTE_NODISCARD 1
1502 #if __has_cpp_attribute(maybe_unused)
1503 #define BSLS_COMPILERFEATURES_SUPPORT_ATTRIBUTE_MAYBE_UNUSED 1
1522#if defined(BSLS_PLATFORM_CMP_GNU)
1524 #define BSLS_COMPILERFEATURES_SUPPORT_INCLUDE_NEXT 1
1526 #if BSLS_PLATFORM_CMP_VERSION >= 30300
1527 #define BSLS_COMPILERFEATURES_SUPPORT_EXTERN_TEMPLATE 1
1532 #if BSLS_PLATFORM_CMP_VERSION >= 50000
1534 #ifndef BSLS_COMPILERFEATURES_GUARANTEED_COPY_ELISION
1535 #define BSLS_COMPILERFEATURES_GUARANTEED_COPY_ELISION 1
1538 #define BSLS_COMPILERFEATURES_SUPPORT_HAS_INCLUDE 1
1541 #if BSLS_PLATFORM_CMP_VERSION < 120000
1542 #define BSLS_COMPILERFEATURES_INITIALIZER_LIST_LEAKS_ON_EXCEPTIONS 1
1545 #if !defined(__GXX_EXPERIMENTAL_CXX0X__) || \
1546 (__cplusplus < 201500 && defined(__STRICT_ANSI__))
1561 #if defined(BSLS_COMPILERFEATURES_SUPPORT_HEXFLOAT_LITERALS)
1562 #undef BSLS_COMPILERFEATURES_SUPPORT_HEXFLOAT_LITERALS
1567 #if defined(__GXX_EXPERIMENTAL_CXX0X__)
1569 #if BSLS_COMPILERFEATURES_CPLUSPLUS < 201103L
1570 #undef BSLS_COMPILERFEATURES_CPLUSPLUS
1571 #define BSLS_COMPILERFEATURES_CPLUSPLUS 201103L
1574 #if BSLS_PLATFORM_CMP_VERSION >= 40800
1575 #define BSLS_COMPILERFEATURES_SUPPORT_ALIAS_TEMPLATES 1
1576 #define BSLS_COMPILERFEATURES_SUPPORT_ALIGNAS 1
1577 #define BSLS_COMPILERFEATURES_SUPPORT_ATTRIBUTE_NORETURN 1
1580 #define BSLS_COMPILERFEATURES_SUPPORT_CONSTEXPR 1
1581 #define BSLS_COMPILERFEATURES_SUPPORT_DECLTYPE 1
1582 #define BSLS_COMPILERFEATURES_SUPPORT_DEFAULT_TEMPLATE_ARGS 1
1583 #define BSLS_COMPILERFEATURES_SUPPORT_DEFAULTED_FUNCTIONS 1
1584 #define BSLS_COMPILERFEATURES_SUPPORT_DELETED_FUNCTIONS 1
1585 #define BSLS_COMPILERFEATURES_SUPPORT_ENUM_CLASS 1
1586 #define BSLS_COMPILERFEATURES_SUPPORT_FINAL 1
1587 #define BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS 1
1588 #define BSLS_COMPILERFEATURES_SUPPORT_INLINE_NAMESPACE 1
1589 #define BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT 1
1590 #define BSLS_COMPILERFEATURES_SUPPORT_NULLPTR 1
1591 #define BSLS_COMPILERFEATURES_SUPPORT_OPERATOR_EXPLICIT 1
1592 #define BSLS_COMPILERFEATURES_SUPPORT_OVERRIDE 1
1593 #define BSLS_COMPILERFEATURES_SUPPORT_RAW_STRINGS 1
1594 #define BSLS_COMPILERFEATURES_SUPPORT_REF_QUALIFIERS 1
1595 #define BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES 1
1596 #define BSLS_COMPILERFEATURES_SUPPORT_STATIC_ASSERT 1
1597 #define BSLS_COMPILERFEATURES_SUPPORT_USER_DEFINED_LITERALS 1
1598 #define BSLS_COMPILERFEATURES_SUPPORT_VARIADIC_TEMPLATES 1
1601 #if BSLS_PLATFORM_CMP_VERSION >= 50000
1602 #define BSLS_COMPILERFEATURES_SUPPORT_TRAITS_HEADER 1
1608 #if BSLS_PLATFORM_CMP_VERSION >= 90000
1609 #define BSLS_COMPILERFEATURES_PP_LINE_IS_ON_FIRST 1
1612 #if __cplusplus >= 201402L
1615 #if BSLS_PLATFORM_CMP_VERSION >= 60000
1616 #define BSLS_COMPILERFEATURES_SUPPORT_CONSTEXPR_CPP14 1
1619 #define BSLS_COMPILERFEATURES_SUPPORT_VARIABLE_TEMPLATES 1
1624 #if __cplusplus >= 201500
1626 #if BSLS_PLATFORM_CMP_VERSION >= 70000
1627 #define BSLS_COMPILERFEATURES_SUPPORT_ATTRIBUTE_FALLTHROUGH 1
1628 #define BSLS_COMPILERFEATURES_SUPPORT_ATTRIBUTE_MAYBE_UNUSED 1
1629 #define BSLS_COMPILERFEATURES_SUPPORT_CONSTEXPR_CPP17 1
1630 #define BSLS_COMPILERFEATURES_SUPPORT_INLINE_VARIABLES 1
1632 #ifndef BSLS_COMPILERFEATURES_SUPPORT_HEXFLOAT_LITERALS
1633 #define BSLS_COMPILERFEATURES_SUPPORT_HEXFLOAT_LITERALS 1
1637 #undef BSLS_COMPILERFEATURES_SUPPORT_THROW_SPECIFICATIONS
1640 #if BSLS_PLATFORM_CMP_VERSION >= 70200
1643 #define BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT_IN_FNC_TYPE 1
1648 #if BSLS_PLATFORM_CMP_VERSION >= 50000
1649 #if BSLS_COMPILERFEATURES_CPLUSPLUS >= 201103L
1650 #define BSLS_COMPILERFEATURES_FULL_CPP11 1
1654 #if BSLS_PLATFORM_CMP_VERSION >= 60000
1655 #if BSLS_COMPILERFEATURES_CPLUSPLUS >= 201402L
1656 #define BSLS_COMPILERFEATURES_FULL_CPP14 1
1660 #if BSLS_PLATFORM_CMP_VERSION >= 90000
1661 #if BSLS_COMPILERFEATURES_CPLUSPLUS >= 201703L
1662 #define BSLS_COMPILERFEATURES_FULL_CPP17 1
1674#if defined(BSLS_PLATFORM_CMP_CLANG)
1676 #ifndef BSLS_COMPILERFEATURES_GUARANTEED_COPY_ELISION
1677 #define BSLS_COMPILERFEATURES_GUARANTEED_COPY_ELISION 1
1680 #define BSLS_COMPILERFEATURES_SUPPORT_HAS_INCLUDE 1
1682 #ifndef BSLS_COMPILERFEATURES_SUPPORT_HEXFLOAT_LITERALS
1683 #define BSLS_COMPILERFEATURES_SUPPORT_HEXFLOAT_LITERALS 1
1686 #define BSLS_COMPILERFEATURES_SUPPORT_INCLUDE_NEXT 1
1687 #define BSLS_COMPILERFEATURES_SUPPORT_EXTERN_TEMPLATE 1
1690 #if __has_feature(cxx_rvalue_references)
1691 #define BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES 1
1694 #if __has_feature(cxx_reference_qualified_functions) && \
1695 __has_feature(cxx_rvalue_references)
1696 #define BSLS_COMPILERFEATURES_SUPPORT_REF_QUALIFIERS 1
1699 #if __has_feature(cxx_default_function_template_args)
1700 #define BSLS_COMPILERFEATURES_SUPPORT_DEFAULT_TEMPLATE_ARGS 1
1703 #if __has_feature(cxx_defaulted_functions)
1704 #define BSLS_COMPILERFEATURES_SUPPORT_DEFAULTED_FUNCTIONS 1
1707 #if __has_feature(cxx_deleted_functions)
1708 #define BSLS_COMPILERFEATURES_SUPPORT_DELETED_FUNCTIONS 1
1711 #if __has_feature(cxx_static_assert)
1712 #define BSLS_COMPILERFEATURES_SUPPORT_STATIC_ASSERT 1
1715 #if __has_feature(cxx_inline_namespaces) || \
1716 __has_extension(cxx_inline_namespaces)
1717 #define BSLS_COMPILERFEATURES_SUPPORT_INLINE_NAMESPACE 1
1720 #if __has_feature(cxx_variadic_templates)
1721 #define BSLS_COMPILERFEATURES_SUPPORT_VARIADIC_TEMPLATES 1
1725 #if __has_feature(cxx_alias_templates)
1726 #define BSLS_COMPILERFEATURES_SUPPORT_ALIAS_TEMPLATES 1
1729 #if __has_feature(cxx_noexcept)
1730 #define BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT 1
1733 #if __has_feature(cxx_raw_string_literals)
1734 #define BSLS_COMPILERFEATURES_SUPPORT_RAW_STRINGS 1
1738 #if __has_feature(cxx_constexpr)
1739 #define BSLS_COMPILERFEATURES_SUPPORT_CONSTEXPR 1
1742 #if __has_feature(cxx_user_literals)
1743 #define BSLS_COMPILERFEATURES_SUPPORT_USER_DEFINED_LITERALS 1
1747 #if __has_feature(cxx_relaxed_constexpr)
1748 #define BSLS_COMPILERFEATURES_SUPPORT_CONSTEXPR_CPP14 1
1751 #if __has_feature(cxx_explicit_conversions)
1752 #define BSLS_COMPILERFEATURES_SUPPORT_OPERATOR_EXPLICIT 1
1755 #if __has_feature(cxx_override_control)
1756 #define BSLS_COMPILERFEATURES_SUPPORT_FINAL 1
1757 #define BSLS_COMPILERFEATURES_SUPPORT_OVERRIDE 1
1760 #if __has_feature(cxx_nullptr)
1761 #define BSLS_COMPILERFEATURES_SUPPORT_NULLPTR 1
1765 #if __has_feature(cxx_generalized_initializers)
1766 #define BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS 1
1769 #if __has_feature(cxx_alignas)
1770 #define BSLS_COMPILERFEATURES_SUPPORT_ALIGNAS 1
1774 #if __has_feature(cxx_decltype)
1775 #define BSLS_COMPILERFEATURES_SUPPORT_DECLTYPE 1
1779 #if __has_feature(cxx_variable_templates)
1780 #define BSLS_COMPILERFEATURES_SUPPORT_VARIABLE_TEMPLATES 1
1783 #if __has_feature(cxx_attributes)
1784 #define BSLS_COMPILERFEATURES_SUPPORT_ATTRIBUTE_NORETURN 1
1788 #if BSLS_COMPILERFEATURES_CPLUSPLUS < 201103L && \
1789 defined(__GXX_EXPERIMENTAL_CXX0X__)
1790 #undef BSLS_COMPILERFEATURES_CPLUSPLUS
1791 #define BSLS_COMPILERFEATURES_CPLUSPLUS 201103L
1794 #if (__cplusplus >= 201103L)
1795 #define BSLS_COMPILERFEATURES_SUPPORT_ENUM_CLASS 1
1798 #if (__cplusplus >= 201103L || \
1799 (defined(__GXX_EXPERIMENTAL_CXX0X__) && \
1800 defined(__apple_build_version__))) \
1801 && __has_include(<type_traits>)
1802 #define BSLS_COMPILERFEATURES_SUPPORT_TRAITS_HEADER 1
1806 #if __cplusplus >= 201703L
1807 #define BSLS_COMPILERFEATURES_SUPPORT_CONSTEXPR_CPP17 1
1808 #define BSLS_COMPILERFEATURES_SUPPORT_INLINE_VARIABLES 1
1809 #define BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT_IN_FNC_TYPE 1
1815 #if defined(__GXX_EXPERIMENTAL_CXX0X__) && \
1816 (!defined(__APPLE_CC__) || __APPLE_CC__ >= 6000)
1817 #define BSLS_COMPILERFEATURES_SUPPORT_TRAITS_HEADER 1
1821 #if BSLS_PLATFORM_CMP_VERSION >= 30300
1822 #if BSLS_COMPILERFEATURES_CPLUSPLUS >= 201103L
1823 #define BSLS_COMPILERFEATURES_FULL_CPP11 1
1827 #if BSLS_PLATFORM_CMP_VERSION >= 30400
1828 #if BSLS_COMPILERFEATURES_CPLUSPLUS >= 201402L
1829 #define BSLS_COMPILERFEATURES_FULL_CPP14 1
1833 #if BSLS_PLATFORM_CMP_VERSION >= 70000
1834 #if BSLS_COMPILERFEATURES_CPLUSPLUS >= 201703L
1835 #define BSLS_COMPILERFEATURES_FULL_CPP17 1
1850#if defined(BSLS_PLATFORM_CMP_MSVC)
1858 #if BSLS_PLATFORM_CMP_VERSION < 1900
1859 #error Earliest supported toolset version is 19.0, Visual Studio 2015
1871 #undef BSLS_COMPILERFEATURES_CPLUSPLUS
1872 #if defined(_MSVC_LANG)
1873 #define BSLS_COMPILERFEATURES_CPLUSPLUS _MSVC_LANG
1875 #define BSLS_COMPILERFEATURES_CPLUSPLUS 201103L
1878 #undef BSLS_COMPILERFEATURES_SUPPORT_THROW_SPECIFICATIONS
1884 #define BSLS_COMPILERFEATURES_SUPPORT_ALIAS_TEMPLATES 1
1885 #define BSLS_COMPILERFEATURES_SUPPORT_ALIGNAS 1
1886 #define BSLS_COMPILERFEATURES_SUPPORT_ATTRIBUTE_NORETURN 1
1887 #define BSLS_COMPILERFEATURES_SUPPORT_DECLTYPE 1
1888 #define BSLS_COMPILERFEATURES_SUPPORT_DEFAULT_TEMPLATE_ARGS 1
1889 #define BSLS_COMPILERFEATURES_SUPPORT_DEFAULTED_FUNCTIONS 1
1890 #define BSLS_COMPILERFEATURES_SUPPORT_DELETED_FUNCTIONS 1
1891 #define BSLS_COMPILERFEATURES_SUPPORT_ENUM_CLASS 1
1892 #define BSLS_COMPILERFEATURES_SUPPORT_EXTERN_TEMPLATE 1
1893 #define BSLS_COMPILERFEATURES_SUPPORT_FINAL 1
1894 #define BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS 1
1895 #define BSLS_COMPILERFEATURES_SUPPORT_INLINE_NAMESPACE 1
1896 #define BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT 1
1897 #define BSLS_COMPILERFEATURES_SUPPORT_NULLPTR 1
1898 #define BSLS_COMPILERFEATURES_SUPPORT_OPERATOR_EXPLICIT 1
1899 #define BSLS_COMPILERFEATURES_SUPPORT_OVERRIDE 1
1900 #define BSLS_COMPILERFEATURES_SUPPORT_RAW_STRINGS 1
1901 #define BSLS_COMPILERFEATURES_SUPPORT_REF_QUALIFIERS 1
1902 #define BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES 1
1903 #define BSLS_COMPILERFEATURES_SUPPORT_STATIC_ASSERT 1
1904 #define BSLS_COMPILERFEATURES_SUPPORT_TRAITS_HEADER 1
1905 #define BSLS_COMPILERFEATURES_SUPPORT_USER_DEFINED_LITERALS 1
1906 #define BSLS_COMPILERFEATURES_SUPPORT_VARIADIC_TEMPLATES 1
1908 #ifndef BSLS_COMPILERFEATURES_GUARANTEED_COPY_ELISION
1909 #define BSLS_COMPILERFEATURES_GUARANTEED_COPY_ELISION 1
1912 #ifndef BSLS_COMPILERFEATURES_SUPPORT_UNICODE_CHAR_TYPES
1913 #define BSLS_COMPILERFEATURES_SUPPORT_UNICODE_CHAR_TYPES 1
1918 #if _MSC_FULL_VER >= 190023918
1919 #define BSLS_COMPILERFEATURES_SUPPORT_VARIABLE_TEMPLATES 1
1922 #if BSLS_PLATFORM_CMP_VERSION >= 1910
1923 #define BSLS_COMPILERFEATURES_SUPPORT_CONSTEXPR 1
1924 #define BSLS_COMPILERFEATURES_SUPPORT_CONSTEXPR_CPP14 1
1926 #if BSLS_COMPILERFEATURES_CPLUSPLUS >= 201703L
1927 #define BSLS_COMPILERFEATURES_SUPPORT_ATTRIBUTE_FALLTHROUGH 1
1928 #define BSLS_COMPILERFEATURES_SUPPORT_CONSTEXPR_CPP17 1
1936 #if BSLS_PLATFORM_CMP_VERSION >= 1911
1937 #define BSLS_COMPILERFEATURES_SUPPORT_HAS_INCLUDE 1
1939 #if BSLS_COMPILERFEATURES_CPLUSPLUS >= 201703L
1940 #define BSLS_COMPILERFEATURES_SUPPORT_ATTRIBUTE_MAYBE_UNUSED 1
1941 #define BSLS_COMPILERFEATURES_SUPPORT_ATTRIBUTE_NODISCARD 1
1943 #if !defined(BSLS_COMPILERFEATURES_SUPPORT_HEXFLOAT_LITERALS)
1944 #define BSLS_COMPILERFEATURES_SUPPORT_HEXFLOAT_LITERALS 1
1950 #if BSLS_PLATFORM_CMP_VERSION >= 1912
1951 #if BSLS_COMPILERFEATURES_CPLUSPLUS >= 201703L
1952 #define BSLS_COMPILERFEATURES_SUPPORT_INLINE_VARIABLES 1
1953 #define BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT_IN_FNC_TYPE 1
1957 #if BSLS_PLATFORM_CMP_VERSION >= 1910 && BSLS_PLATFORM_CMP_VERSION < 1920
1959 #ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
1960 #undef BSLS_COMPILERFEATURES_SUPPORT_CTAD
1965 #if BSLS_PLATFORM_CMP_VERSION >= 1910
1966 #if BSLS_COMPILERFEATURES_CPLUSPLUS >= 201103L
1967 #define BSLS_COMPILERFEATURES_FULL_CPP11 1
1972 #if BSLS_PLATFORM_CMP_VERSION >= 1911
1973 #if BSLS_COMPILERFEATURES_CPLUSPLUS >= 201402L
1974 #define BSLS_COMPILERFEATURES_FULL_CPP14 1
1979 #if BSLS_PLATFORM_CMP_VERSION >= 1921
1980 #if BSLS_COMPILERFEATURES_CPLUSPLUS >= 201703L
1981 #define BSLS_COMPILERFEATURES_FULL_CPP17 1
1993#if defined(BSLS_PLATFORM_CMP_IBM)
2000 #if defined(__IBMCPP_CONSTEXPR)
2001 #define BSLS_COMPILERFEATURES_SUPPORT_CONSTEXPR 1
2004 #if defined(__IBMCPP_DECLTYPE)
2005 #define BSLS_COMPILERFEATURES_SUPPORT_DECLTYPE 1
2008 #if defined(__IBMCPP_DEFAULTED_AND_DELETED_FUNCTIONS)
2009 #define BSLS_COMPILERFEATURES_SUPPORT_DEFAULTED_FUNCTIONS 1
2010 #define BSLS_COMPILERFEATURES_SUPPORT_DELETED_FUNCTIONS 1
2013 #if defined(__IBMCPP_EXPLICIT)
2014 #define BSLS_COMPILERFEATURES_SUPPORT_OPERATOR_EXPLICIT 1
2017 #if defined(__IBMCPP_EXTERN_TEMPLATE)
2018 #define BSLS_COMPILERFEATURES_SUPPORT_EXTERN_TEMPLATE 1
2021 #if defined(__IBM_INCLUDE_NEXT)
2022 #define BSLS_COMPILERFEATURES_SUPPORT_INCLUDE_NEXT 1
2025 #if defined(__IBMCPP_INLINE_NAMESPACE)
2026 #define BSLS_COMPILERFEATURES_SUPPORT_INLINE_NAMESPACE 1
2029 #if defined(__IBMCPP_NULLPTR)
2030 #define BSLS_COMPILERFEATURES_SUPPORT_NULLPTR 1
2033 #if defined(__IBMCPP_OVERRIDE)
2034 #define BSLS_COMPILERFEATURES_SUPPORT_FINAL 1
2035 #define BSLS_COMPILERFEATURES_SUPPORT_OVERRIDE 1
2038 #if defined(__IBMCPP_RVALUE_REFERENCES)
2039 #define BSLS_COMPILERFEATURES_SUPPORT_REF_QUALIFIERS 1
2040 #define BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES 1
2043 #if defined(__IBMCPP_STATIC_ASSERT)
2044 #define BSLS_COMPILERFEATURES_SUPPORT_STATIC_ASSERT 1
2047 #if defined(__IBMCPP_VARIADIC_TEMPLATES)
2048 #define BSLS_COMPILERFEATURES_SUPPORT_VARIADIC_TEMPLATES 1
2051 #if defined(__IBMC_NORETURN)
2056 #if defined(__C99_HEX_FLOAT_CONST)
2062 #if BSLS_PLATFORM_CMP_VERSION <= 0x1001
2063 #ifdef BSLS_COMPILERFEATURES_SUPPORT_HEXFLOAT_LITERALS
2064 #undef BSLS_COMPILERFEATURES_SUPPORT_HEXFLOAT_LITERALS
2066 #elif !defined(BSLS_COMPILERFEATURES_SUPPORT_HEXFLOAT_LITERALS)
2070 #define BSLS_COMPILERFEATURES_SUPPORT_HEXFLOAT_LITERALS 1
2103#if defined(BSLS_PLATFORM_CMP_SUN)
2113 #if __cplusplus >= 201103L
2116 #if BSLS_PLATFORM_CMP_VERSION >= 0x5130
2117 #define BSLS_COMPILERFEATURES_SUPPORT_ALIAS_TEMPLATES 1
2118 #define BSLS_COMPILERFEATURES_SUPPORT_ATTRIBUTE_NORETURN 1
2119 #define BSLS_COMPILERFEATURES_SUPPORT_DECLTYPE 1
2120 #define BSLS_COMPILERFEATURES_SUPPORT_DEFAULTED_FUNCTIONS 1
2121 #define BSLS_COMPILERFEATURES_SUPPORT_DELETED_FUNCTIONS 1
2122 #define BSLS_COMPILERFEATURES_SUPPORT_ENUM_CLASS 1
2123 #define BSLS_COMPILERFEATURES_SUPPORT_EXTERN_TEMPLATE 1
2124 #define BSLS_COMPILERFEATURES_SUPPORT_FINAL 1
2125 #define BSLS_COMPILERFEATURES_SUPPORT_INLINE_NAMESPACE 1
2126 #define BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT 1
2127 #define BSLS_COMPILERFEATURES_SUPPORT_NULLPTR 1
2128 #define BSLS_COMPILERFEATURES_SUPPORT_OPERATOR_EXPLICIT 1
2129 #define BSLS_COMPILERFEATURES_SUPPORT_OVERRIDE 1
2130 #define BSLS_COMPILERFEATURES_SUPPORT_RAW_STRINGS 1
2131 #define BSLS_COMPILERFEATURES_SUPPORT_STATIC_ASSERT 1
2135 #if BSLS_PLATFORM_CMP_VERSION >= 0x5140
2136 #define BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS 1
2143 #define BSLS_COMPILERFEATURES_SUPPORT_REF_QUALIFIERS 1
2148 #define BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES 1
2152 #define BSLS_COMPILERFEATURES_SUPPORT_TRAITS_HEADER 1
2157 #define BSLS_COMPILERFEATURES_SUPPORT_VARIADIC_TEMPLATES 1
2161 #define BSLS_COMPILERFEATURES_SUPPORT_UNICODE_CHAR_TYPES 1
2163 #define BSLS_COMPILERFEATURES_SUPPORT_USER_DEFINED_LITERALS 1
2168 #if BSLS_PLATFORM_CMP_VERSION >= 0x5150
2169 #define BSLS_COMPILERFEATURES_SUPPORT_CONSTEXPR 1
2178 #define BSLS_COMPILERFEATURES_SUPPORT_DEFAULT_TEMPLATE_ARGS 1
2187 #if BSLS_PLATFORM_CMP_VERSION < 0x5160
2188 #define BSLS_COMPILERFEATURES_INITIALIZER_LIST_LEAKS_ON_EXCEPTIONS 1
2198 #if __cplusplus >= 201402L
2200 #if BSLS_PLATFORM_CMP_VERSION > 0x5150
2201 #define BSLS_COMPILERFEATURES_SUPPORT_VARIABLE_TEMPLATES 1
2225#ifdef BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT_IN_FNC_TYPE
2226 #define BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT_TYPES 1
2233#if defined(__cpp_lib_is_constant_evaluated)
2234 #define BSLS_COMPILERFEATURES_SUPPORT_IS_CONSTANT_EVALUATED 1
2244#if BSLS_COMPILERFEATURES_CPLUSPLUS >= 201703L
2245 #undef BSLS_COMPILERFEATURES_SUPPORT_THROW_SPECIFICATIONS
2252#if defined(BSLS_COMPILERFEATURES_FULL_CPP11)
2253# if BSLS_COMPILERFEATURES_CPLUSPLUS < 201103L
2254# error C++11 is not enabled
2257#if defined(BSLS_COMPILERFEATURES_FULL_CPP14)
2258# if BSLS_COMPILERFEATURES_CPLUSPLUS < 201402L
2259# error C++14 is not enabled
2262#if defined(BSLS_COMPILERFEATURES_FULL_CPP17)
2263# if BSLS_COMPILERFEATURES_CPLUSPLUS < 201703L
2264# error C++17 is not enabled
2267#if defined(BSLS_COMPILERFEATURES_FULL_CPP20)
2268# if BSLS_COMPILERFEATURES_CPLUSPLUS < 202002L
2269# error C++20 is not enabled
2272#if defined(BSLS_COMPILERFEATURES_FULL_CPP23)
2273# if BSLS_COMPILERFEATURES_CPLUSPLUS < 202302L
2274# error C++23 is not enabled
2282#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
2283 !defined(BSLS_COMPILERFEATURES_SUPPORT_ALIAS_TEMPLATES)
2285 #undef BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES
2295#if !defined(BSLS_COMPILERFEATURES_SUPPORT_VARIADIC_TEMPLATES)
2297 #define BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES 1
2299 #ifndef BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
2300 #define BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES 1
2303 #if defined(__cplusplus) && BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
2305 #define BSLS_COMPILERFEATURES_NILT BloombergLP::bsls::CompilerFeaturesNilT
2307 #define BSLS_COMPILERFEATURES_NILV BloombergLP::bsls::CompilerFeaturesNilV
2309 #define BSLS_COMPILERFEATURES_NILTR(n) BSLS_COMPILERFEATURES_NILT,
2311 #define BSLS_COMPILERFEATURES_FILLT(n) \
2312 BSLS_MACROREPEAT(n, BSLS_COMPILERFEATURES_NILTR) \
2313 BSLS_COMPILERFEATURES_NILT
2315 #define BSLS_COMPILERFEATURES_NILVR(n) BSLS_COMPILERFEATURES_NILV,
2317 #define BSLS_COMPILERFEATURES_FILLV(n) \
2318 BSLS_MACROREPEAT(n,BSLS_COMPILERFEATURES_NILVR) \
2319 BSLS_COMPILERFEATURES_NILV
2324enum CompilerFeaturesNilT { COMPILERFEATURESNILV = 0x7fff6f76 };
2332#ifndef BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES
2333 #define BSLS_COMPILERFEATURES_SIMULATE_FORWARD_WORKAROUND 1
2335 #ifndef BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
2336 #define BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES 1
2340#ifdef BSLS_COMPILERFEATURES_SIMULATE_FORWARD_WORKAROUND
2343 #define BSLS_COMPILERFEATURES_FORWARD_REF(T) const T&
2349 #define BSLS_COMPILERFEATURES_FORWARD(T,V) \
2350 ::BloombergLP::bslmf::Util::forward(V)
2361 #define BSLS_COMPILERFEATURES_FORWARD_REF(T) T&&
2363 #define BSLS_COMPILERFEATURES_FORWARD(T,V) \
2364 ::BloombergLP::bsls::Util::forward<T>(V)
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition bdlt_iso8601util.h:707