Micro template library
A library for building device drivers
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- /*!
- * \file utl/core/version.h
- * \brief utl version and cpp version checks
- */
- #ifndef __utl_core_version_h__
- #define __utl_core_version_h__
-
- //!\addtogroup core
- //! @{
-
- //! \defgroup version Version
- //! Definitions of the utl version and compiler features
- //!@{
-
- //! utl version as string
- #define UTL_VERSION "0.1.0"
- #define UTL_VERSION_MAJOR 0
- #define UTL_VERSION_MINOR 1
- #define UTL_VERSION_PATCH 0
-
- //! utl version as integer
- //!
- //! This can be used in the user files to check for uTL versions.
- //! The version number is constructed using:\n
- //! \f$ ver = (Maj*10000 + Min*100 + Patch) \f$
- #define UTL_VERSION_VALUE ( (UTL_VERSION_MAJOR * 10000) \
- + (UTL_VERSION_MINOR * 100) \
- + UTL_VERSION_PATCH)
-
- //!@}
-
- //! \name Compiler and feature checks
- //! These checks are used inside uTL, but the user is free to use the as well.
- //! @{
- #define CXX_VER __cplusplus //!< Current compiler's version
- #define CXX_VER_STD_11 201103L //!< C++11
- #define CXX_VER_STD_14 201402L //!< C++14
- #define CXX_VER_STD_17 201703L //!< C++17
-
- //! \def CXX_VARIABLE_TEMPLATES
- //! Check for variable templates (Non-zero if available)
- #ifndef CXX_VARIABLE_TEMPLATES
- #ifdef __cpp_variable_templates
- #define CXX_VARIABLE_TEMPLATES __cpp_variable_templates
- #else
- #define CXX_VARIABLE_TEMPLATES (CXX_VER >= CXX_VER_STD_14)
- #endif
- #endif
-
- //! \def CXX_CONCEPTS
- //! Check for concepts (Non-zero if available)
- #ifndef CXX_CONCEPTS
- #ifdef __cpp_concepts
- #define CXX_CONCEPTS __cpp_concepts
- #else
- #define CXX_CONCEPTS 0
- #endif
- #endif
-
- //! \def CXX_INLINE_VARIABLES
- //! Check for inline variables (Non-zero if available)
- #ifndef CXX_INLINE_VARIABLES
- #ifdef __cpp_inline_variables
- #define CXX_INLINE_VARIABLES __cpp_inline_variables
- #else
- #define CXX_INLINE_VARIABLES (CXX_VER >= CXX_VER_STD_17)
- #endif
- #endif
-
- //! \def CXX_FOLD_EXPRESSIONS
- //! Check for fold expressions (Non-zero if available)
- #ifndef CXX_FOLD_EXPRESSIONS
- #ifdef __cpp_fold_expressions
- #define CXX_FOLD_EXPRESSIONS __cpp_fold_expressions
- #else
- #define CXX_FOLD_EXPRESSIONS (CXX_VER >= CXX_VER_STD_17)
- #endif
- #endif
-
- //! @}
-
-
- //! \name Workaround inspections
- //! @{
-
- #if defined(__GNUC__) && (__GNUC__ < 5)
- // https://wg21.link/cwg1558
- #define UTL_WORKAROUND_CWG_1558
- #endif
-
- //! Base library requirement
- #if CXX_VER < CXX_VER_STD_14
- #error "uTL requires C++14"
- #endif
-
- //! @}
-
- //! @}
- #endif /* #ifndef __utl_core_version_h__ */
|