cxxomfort  rel.20211024
Simple backports for C++ - https://ryan.gulix.cl/fossil.cgi/cxxomfort/
Macros
_support.hpp File Reference

Macros

#define CXXOMFORT_CXX_STD   (__cplusplus/100)
 Year of the Standard mode found.Example possible values: 2017 (C++17), 2014 (C++14), 2011 (C++11), 2003 (C++03/C++ with TR1), 1997 (C++98), 1 or 0 (for compilers that don't set __cplusplus)
 
#define CXXOMFORT_CXX_EMULATION   0
 Year of the Standard version that is being emulated, if it can be determined.Example possible values: 2017 (C++17), 2014 (C++14), 2011 (C++11 / C++0x), 2007 (C++98 with TR1) or 0.
 
#define CXXO_COMPILER_SUPPORT___alignof   0
 If compiler supports a __alignof intrinsic.
 
#define CXXO_COMPILER_SUPPORT_type_intrinsics   0
 If compiler supports the type-category intrinsics (is_enum, is_class, is_union).
 
#define CXXO_COMPILER_SUPPORT_functional_oldstyle   (CXXOMFORT_CXX_STD<2017)
 If compiler provides support for <functional>'s classic binders.
 
#define CXXO_COMPILER_SUPPORT_tr1_array   0
 If compiler declares std::tr1::array<> et al.
 
#define CXXO_COMPILER_SUPPORT_tr1_cstdint   0
 If compiler declares std::tr1::uint16_t et al.
 
#define CXXO_COMPILER_SUPPORT_tr1_random   0
 If compiler declares std::tr1::uniform_int_distribution et al.
 
#define CXXO_COMPILER_SUPPORT_tr1_tuple   0
 If compiler declares std::tr1::tuple<> et al.
 
#define CXXO_COMPILER_SUPPORT_tr1_type_traits   0
 If compiler declares std::tr1::is_const<> et al.
 
#define CXXO_COMPILER_SUPPORT_typeof   0
 If compiler provides support for typeof eg.: in C++03.
 
#define CXXO_COMPILER_SUPPORT_va_args   0
 If compiler provides support for variadic macros (__VA_ARG__).
 
#define CXXO_CXXSTDHEADER_array   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides a <array> header.
 
#define CXXO_CXXSTDHEADER_cinttypes   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides a <cinttypes> header.
 
#define CXXO_CXXSTDHEADER_cstdint   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides a <cstdint> header.
 
#define CXXO_CXXSTDHEADER_cuchar   (CXXOMFORT_CXX_STD>=2011)
 If compiler supports <cuchar> header.
 
#define CXXO_CXXSTDHEADER_random   (CXXOMFORT_CXX_STD>=2011)
 If compiler brings <random> header.
 
#define CXXO_CXXSTDHEADER_ratio   (CXXOMFORT_CXX_STD>=2011)
 If compiler brings <ratio> header.
 
#define CXXO_CXXSTDHEADER_system_error   (CXXOMFORT_CXX_STD>=2011)
 If compiler brings <system_error> header.
 
#define CXXO_CXXSTDHEADER_tuple   (CXXOMFORT_CXX_STD>=2011)
 If compiler brings <tuple> header.
 
#define CXXO_CXXSTDHEADER_typeindex   (CXXOMFORT_CXX_STD>=2011)
 If compiler brings <typeindex> header.
 
#define CXXO_CXXSTDHEADER_type_traits   (CXXOMFORT_CXX_STD>=2011)
 If compiler brings <type_traits> header.
 
#define CXXO_COMPILER_SUPPORT_alignof   0
 If compiler provides support for alignof(T) .
 
#define CXXO_COMPILER_SUPPORT_array   (CXXOMFORT_CXX_STD >= 2011)
 If compiler provides support for std::array
 
#define CXXO_COMPILER_SUPPORT_attribute   0
 If compiler provides support for [[attribute]].
 
#define CXXO_COMPILER_SUPPORT_auto   (CXXOMFORT_CXX_STD>=2011)
 If compiler supports new (type-deduction) semantics for auto .
 
#define CXXO_COMPILER_SUPPORT_charn_t   0
 If compiler provides support for the new C++11 char types.
 
#define CXXO_COMPILER_SUPPORT_charn_t_IS_TYPEDEF   0
 If the above types are defined as typedef of integral types (such as unsigned short).
 
#define CXXO_COMPILER_SUPPORT_constexpr   0
 If compiler provides support for constexpr .
 
#define CXXO_COMPILER_SUPPORT_decltype   0
 If compiler supports decltype(expr) .
 
#define CXXO_COMPILER_SUPPORT_default_delete   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for =default-ed and =delete-d members.
 
#define CXXO_COMPILER_SUPPORT_enum_class   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for scoped enumerations ie.: enum class....
 
#define CXXO_COMPILER_SUPPORT_explicit_operator   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for explicit operator ... casts.
 
#define CXXO_COMPILER_SUPPORT_foreach   0
 If compiler provides support for range-for.
 
#define CXXO_COMPILER_SUPPORT_inheritance_final   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for inheritance's "final" keyword.
 
#define CXXO_COMPILER_SUPPORT_inheritance_override   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for inheritance's "override" keyword.
 
#define CXXO_COMPILER_SUPPORT_inheriting_constructors   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for inheriting constructors.
 
#define CXXO_COMPILER_SUPPORT_initializer_list   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for std::initializer_list .
 
#define CXXO_COMPILER_SUPPORT_lambda_expressions   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for lambda-expressions.
 
#define CXXO_COMPILER_SUPPORT_local_types   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for local and unnamed types as template arguments.
 
#define CXXO_COMPILER_SUPPORT_noexcept   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for noexcept AND is_noexcept-traits.
 
#define CXXO_COMPILER_SUPPORT_nullptr   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for nullptr and std::nullptr_t .
 
#define CXXO_COMPILER_SUPPORT_raw_strings   (CXXOMFORT_CXX_STD>=2011 || defined(__cpp_raw_strings))
 If compiler provides support for raw string literals.
 
#define CXXO_COMPILER_SUPPORT_rvref   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for T&& .
 
#define CXXO_COMPILER_SUPPORT_shared_ptr   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for shared_ptr<T>.
 
#define CXXO_COMPILER_SUPPORT_static_assert   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for static_assert .
 
#define CXXO_COMPILER_SUPPORT_std_is_trivially   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for the std::is_[trivially|nothrow]_... traits.
 
#define CXXO_COMPILER_SUPPORT_template_aliases   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for template aliases (template<> using)
 
#define CXXO_COMPILER_SUPPORT_trailing_returns   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for trailing return types.
 
#define CXXO_COMPILER_SUPPORT_type_traits_basic   (CXXOMFORT_CXX_STD>=2011 || CXXOMFORT_CXX_EMULATION>=2011)
 If compiler provides support for type traits (basic category)
 
#define CXXO_COMPILER_SUPPORT_type_traits_intrinsic   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for type traits (type intrinsics category)
 
#define CXXO_COMPILER_SUPPORT_unicode_string_literals   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for Unicode literals.
 
#define CXXO_COMPILER_SUPPORT_user_defined_literals   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for user-defined-literals.
 
#define CXXO_COMPILER_SUPPORT_variadic   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for variadic templates.
 
#define CXXO_COMPILER_SUPPORT_alignment_tools   0
 If compiler provides support for alignment tools (alignas , aligned_storage , etc).
 
#define CXXO_COMPILER_SUPPORT_common_type   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for variadic common_type.
 
#define CXXO_COMPILER_SUPPORT_conditional_enableif   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for the new C++11 helpers std::enable_if, std::conditional.
 
#define CXXO_COMPILER_SUPPORT_iterator_accessors_11   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for the new C++11 helpers std::begin, std::end.
 
#define CXXO_COMPILER_SUPPORT_std_cxx11_algorithms   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for the new C++11 std algorithms.
 
#define CXXO_COMPILER_SUPPORT_std_hash   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for the C++11-onward std::hash.
 
#define CXXO_COMPILER_SUPPORT_std_hash_basicstring   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for std::hash<std::string> etc.
 
#define CXXO_COMPILER_SUPPORT_std_hash_errorcode   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for std::hash<std::error_code>
 
#define CXXO_COMPILER_SUPPORT_std_hash_typeindex   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for std::hash<std::type_index> etc.
 
#define CXXO_COMPILER_SUPPORT_std_iterator_helpers_next_prev   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for std::next, std::prev.
 
#define CXXO_COMPILER_SUPPORT_std_is_constructible_traits   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for the "is_constructible", "is_assignable", and similar traits.
 
#define CXXO_COMPILER_SUPPORT_unique_ptr   (CXXOMFORT_CXX_STD>=2011)
 If compiler provides support for unique_ptr<T> .
 
#define CXXO_COMPILER_SUPPORT_constexpr_relaxed   (CXXOMFORT_CXX_STD>=2014)
 If compiler provides support for C++14's relaxed form of constexpr .
 
#define CXXO_COMPILER_SUPPORT_auto_return   0
 If compiler provides support for C++14's auto return type deduction.
 
#define CXXO_COMPILER_SUPPORT_decltypeauto   0
 If compiler provides support for C++14's "decltype(auto)".
 
#define CXXO_COMPILER_SUPPORT_lambda_expressions_generic   0
 If compiler provides support for generic lambdas.
 
#define CXXO_COMPILER_SUPPORT_nsdmi   (CXXOMFORT_CXX_STD>=2014)
 If compiler provides support for C++14's nonstatic data member init (NSDMI)
 
#define CXXO_COMPILER_SUPPORT_integer_sequence   (CXXOMFORT_CXX_STD>=2014)
 If compiler provides support for "integer_sequence".
 
#define CXXO_COMPILER_SUPPORT_iterator_accessors_14   (CXXOMFORT_CXX_STD>=2014)
 If compiler supports C++14's nonmember iterator accessors (rbegin, rend)
 
#define CXXO_COMPILER_SUPPORT_transparent_operators_functional   (CXXOMFORT_CXX_STD>=2014)
 If compiler provides support for transparent std::plus, etc.
 
#define CXXO_COMPILER_SUPPORT_tuple_get_type   0
 If compiler provides support for C++14's tuple get<type>
 
#define CXXO_COMPILER_SUPPORT_udl_s_basic_string   0
 If compiler provides support for C++14's operator"" s.
 
#define CXXO_COMPILER_SUPPORT_equal_mismatch_full_ranges   0
 If compiler provides support for the two-form full ranges equal/mismatch.
 
#define CXXO_CXXSTDHEADER_charconv   0
 If compiler provides a <charconv> header.
 
#define CXXO_CXXSTDHEADER_string_view   0
 If compiler provides a <string_view> header.
 
#define CXXO_CXXSTDHEADER_any   0
 If compiler provides a <any> header.
 
#define CXXO_CXXSTDHEADER_optional   0
 If compiler provides a <optional> header.
 
#define CXXO_CXXSTDHEADER_variant   0
 If compiler provides a <variant> header.
 
#define CXXO_COMPILER_SUPPORT_attribute_nodiscard   0
 If compiler provides support for attribute [[nodiscard]].
 
#define CXXO_COMPILER_SUPPORT_static_assert_17   (CXXOMFORT_CXX_STD >= 2017)
 If compiler supports static_assert with no message (n3928)
 
#define CXXO_COMPILER_SUPPORT_bool_constant   0
 If compiler supports C++17's bool_constant.
 
#define CXXO_COMPILER_SUPPORT_inline_variables   0
 if compiler supports inline variables as per p0386
 
#define CXXO_COMPILER_SUPPORT_std_clamp   0
 If compiler supports C++17's clamp()
 
#define CXXO_COMPILER_SUPPORT_iterator_accessors_17   (CXXOMFORT_CXX_STD>=2017)
 If compiler supports C++17's nonmember iterator accessors.
 
#define CXXO_COMPILER_SUPPORT_std_byte   0
 If compiler supports C++17's std::byte.
 
#define CXXO_COMPILER_SUPPORT_invoke   0
 If compiler supports C++17's std::invoke.
 
#define CXXO_COMPILER_SUPPORT_udl_sv_basic_string_view   (CXXOMFORT_CXX_STD>=2017)
 If compiler supports C++17's operator"" sv.
 
#define CXXO_COMPILER_SUPPORT_std_hash_basicstringview   (CXXOMFORT_CXX_STD>=2017)
 If compiler provides support for std::hash<std::string_view> etc.
 
#define CXXO_COMPILER_SUPPORT_std_hash_optional   0
 If compiler provides support for std::hash<std::optional>
 
#define CXXO_COMPILER_SUPPORT_std_hash_variant   0
 If compiler provides support for std::hash<std::variant>
 
#define CXXO_CXXSTDHEADER_span   (CXXOMFORT_CXX_STD>=2020)
 If compiler provides a header.
 
#define CXXO_CXXSTDHEADER_endian   (CXXOMFORT_CXX_STD>=2020)
 If compiler provides a <endian> header.
 
#define CXXO_COMPILER_SUPPORT_twos_complement   (CXXOMFORT_CXX_STD>=2020)
 If compiler supports signed integer as twos complement (p1236)
 
#define CXXO_COMPILER_SUPPORT_algorithm_shift   0
 If compiler supports shift algorithms.
 
#define CXXO_COMPILER_SUPPORT_attribute_likely   (CXXOMFORT_CXX_STD>=2020)
 If compiler supports attribute [[likely]].
 
#define CXXO_COMPILER_SUPPORT_bit_cast   (CXXOMFORT_CXX_STD>=2020)
 If compiler supports bit_cast()
 
#define CXXO_COMPILER_SUPPORT_constexpr_numeric   (CXXOMFORT_CXX_STD>=2020)
 If compiler supports constexpr for algorithms in <numeric>
 
#define CXXO_COMPILER_SUPPORT_destroying_delete   (CXXOMFORT_CXX_STD>=2020)
 If compiler supports destroying delete .
 
#define CXXO_COMPILER_SUPPORT_explicit_condition   (CXXOMFORT_CXX_STD>=2020)
 If compiler supports explicit(condition)
 
#define CXXO_COMPILER_SUPPORT_spaceship   (CXXOMFORT_CXX_STD>=2020)
 If compiler supports spaceship operator.
 
#define CXXO_COMPILER_SUPPORT_bind_front   0
 If compiler supports bind_front()
 
#define CXXO_COMPILER_SUPPORT_endian   (CXXOMFORT_CXX_STD>=2020)
 If compiler supports endian.
 
#define CXXO_COMPILER_SUPPORT_invoke_r   0
 If compiler supports C++17's std::invoke.
 
#define CXXOFLAG_INCLUDE_PATH   includepath_to_system_includes
 If defined, alternate filesystm path where to find C++ headers.
 
#define CXXOFLAG_MAKE_TYPEDEF_charn_t   0
 Makes the reserved names char16_t , char32_t available via typedefs or named types.When in C++03 mode, if this macro is enabled, <cxxomfort/cuchar.hpp> will set up the names char16_t and char32_t as typedefs to uint16_t and uint32_t respectively, thus making them integral integer types, instead of declaring our own char16_t and char32_t types.
The former also follows how the names are set up in eg.: GCC in C++0x (not C++11) mode. More...
 

Macro Definition Documentation

◆ CXXOFLAG_MAKE_TYPEDEF_charn_t

#define CXXOFLAG_MAKE_TYPEDEF_charn_t   0

Makes the reserved names char16_t , char32_t available via typedefs or named types.When in C++03 mode, if this macro is enabled, <cxxomfort/cuchar.hpp> will set up the names char16_t and char32_t as typedefs to uint16_t and uint32_t respectively, thus making them integral integer types, instead of declaring our own char16_t and char32_t types.
The former also follows how the names are set up in eg.: GCC in C++0x (not C++11) mode.

Note
This flag is usually set by cxxomfort automatically.