Reformatted

This commit is contained in:
John Wellbelove 2020-10-19 08:41:50 +01:00
parent c31e5c83e7
commit 545f8d42ce

View File

@ -39,7 +39,7 @@ SOFTWARE.
// Define a debug macro
#if (defined(_DEBUG) || defined(DEBUG)) && !defined(ETL_DEBUG)
#define ETL_DEBUG
#define ETL_DEBUG
#endif
// Determine the bit width of the platform.
@ -96,74 +96,74 @@ SOFTWARE.
// Option to force string construction from a character pointer to be explicit.
#if defined(ETL_FORCE_EXPLICIT_STRING_CONVERSION_FROM_CHAR)
#define ETL_EXPLICIT_STRING_FROM_CHAR explicit
#define ETL_EXPLICIT_STRING_FROM_CHAR explicit
#else
#define ETL_EXPLICIT_STRING_FROM_CHAR
#define ETL_EXPLICIT_STRING_FROM_CHAR
#endif
// The macros below are dependent on the profile.
// C++11
#if ETL_CPP11_SUPPORTED && !defined(ETL_FORCE_NO_ADVANCED_CPP)
#define ETL_CONSTEXPR constexpr
#define ETL_CONST_OR_CONSTEXPR constexpr
#define ETL_DELETE = delete
#define ETL_EXPLICIT explicit
#define ETL_OVERRIDE override
#define ETL_FINAL final
#define ETL_NORETURN [[noreturn]]
#define ETL_CONSTEXPR constexpr
#define ETL_CONSTANT constexpr
#define ETL_DELETE = delete
#define ETL_EXPLICIT explicit
#define ETL_OVERRIDE override
#define ETL_FINAL final
#define ETL_NORETURN [[noreturn]]
#if defined(ETL_THROW_EXCEPTIONS)
#define ETL_NOEXCEPT noexcept
#define ETL_NOEXCEPT_EXPR(expression) noexcept(expression)
#if defined(ETL_THROW_EXCEPTIONS)
#define ETL_NOEXCEPT noexcept
#define ETL_NOEXCEPT_EXPR(expression) noexcept(expression)
#else
#define ETL_NOEXCEPT
#define ETL_NOEXCEPT_EXPR(expression)
#endif
#else
#define ETL_NOEXCEPT
#define ETL_NOEXCEPT_EXPR(expression)
#endif
#else
#define ETL_CONSTEXPR
#define ETL_CONST_OR_CONSTEXPR const
#define ETL_DELETE
#define ETL_EXPLICIT
#define ETL_OVERRIDE
#define ETL_FINAL
#define ETL_NORETURN
#define ETL_NOEXCEPT
#define ETL_NOEXCEPT_EXPR(expression)
#define ETL_CONSTEXPR
#define ETL_CONSTANT const
#define ETL_DELETE
#define ETL_EXPLICIT
#define ETL_OVERRIDE
#define ETL_FINAL
#define ETL_NORETURN
#define ETL_NOEXCEPT
#define ETL_NOEXCEPT_EXPR(expression)
#endif
// C++14
#if ETL_CPP14_SUPPORTED && !defined(ETL_FORCE_NO_ADVANCED_CPP)
#define ETL_CONSTEXPR14 constexpr
#define ETL_DEPRECATED [[deprecated]]
#define ETL_DEPRECATED_REASON(reason) [[deprecated(reason)]]
#define ETL_CONSTEXPR14 constexpr
#define ETL_DEPRECATED [[deprecated]]
#define ETL_DEPRECATED_REASON(reason) [[deprecated(reason)]]
#else
#define ETL_CONSTEXPR14
#define ETL_DEPRECATED
#define ETL_DEPRECATED_REASON(reason)
#define ETL_CONSTEXPR14
#define ETL_DEPRECATED
#define ETL_DEPRECATED_REASON(reason)
#endif
// C++17
#if ETL_CPP17_SUPPORTED && !defined(ETL_FORCE_NO_ADVANCED_CPP)
#define ETL_CONSTEXPR17 constexpr
#define ETL_IF_CONSTEXPR constexpr
#define ETL_NODISCARD [[nodiscard]]
#define ETL_FALLTHROUGH [[fallthrough]]
#define ETL_CONSTEXPR17 constexpr
#define ETL_IF_CONSTEXPR constexpr
#define ETL_NODISCARD [[nodiscard]]
#define ETL_FALLTHROUGH [[fallthrough]]
#else
#define ETL_CONSTEXPR17
#define ETL_IF_CONSTEXPR
#define ETL_NODISCARD
#define ETL_FALLTHROUGH
#define ETL_CONSTEXPR17
#define ETL_IF_CONSTEXPR
#define ETL_NODISCARD
#define ETL_FALLTHROUGH
#endif
// C++20
#if ETL_CPP20_SUPPORTED && !defined(ETL_FORCE_NO_ADVANCED_CPP)
#define ETL_LIKELY [[likely]]
#define ETL_UNLIKELY [[unlikely]]
#define ETL_CONSTEXPR20 constexpr
#define ETL_LIKELY [[likely]]
#define ETL_UNLIKELY [[unlikely]]
#define ETL_CONSTEXPR20 constexpr
#else
#define ETL_LIKELY
#define ETL_UNLIKELY
#define ETL_CONSTEXPR20
#define ETL_LIKELY
#define ETL_UNLIKELY
#define ETL_CONSTEXPR20
#endif
// Sort out namespaces for STL/No STL options.