diff --git a/.coderabbit.yaml b/.coderabbit.yaml index b9db399c..259a9798 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -197,4 +197,3 @@ reviews: chat: art: false auto_reply: true - \ No newline at end of file diff --git a/include/etl/byte.h b/include/etl/byte.h index 264788f8..51528288 100644 --- a/include/etl/byte.h +++ b/include/etl/byte.h @@ -41,7 +41,7 @@ namespace etl template constexpr typename etl::enable_if::value, TInteger>::type - to_integer(etl::byte b) noexcept + to_integer(etl::byte b) ETL_NOEXCEPT { return TInteger(b); } @@ -52,7 +52,7 @@ namespace etl template constexpr typename etl::enable_if::value, etl::byte>::type - operator <<(etl::byte b, TInteger shift) noexcept + operator <<(etl::byte b, TInteger shift) ETL_NOEXCEPT { return etl::byte(static_cast(b) << shift); } @@ -63,7 +63,7 @@ namespace etl template constexpr typename etl::enable_if::value, etl::byte>::type - operator >>(etl::byte b, TInteger shift) noexcept + operator >>(etl::byte b, TInteger shift) ETL_NOEXCEPT { return etl::byte(static_cast(b) >> shift); } @@ -74,7 +74,7 @@ namespace etl template constexpr typename etl::enable_if::value, etl::byte&>::type - operator <<=(etl::byte& b, TInteger shift) noexcept + operator <<=(etl::byte& b, TInteger shift) ETL_NOEXCEPT { return b = b << shift;; } @@ -85,7 +85,7 @@ namespace etl template constexpr typename etl::enable_if::value, etl::byte&>::type - operator >>=(etl::byte& b, TInteger shift) noexcept + operator >>=(etl::byte& b, TInteger shift) ETL_NOEXCEPT { return b = b >> shift; } @@ -93,7 +93,7 @@ namespace etl //************************************************************************* /// Or. //************************************************************************* - inline constexpr etl::byte operator |(etl::byte lhs, etl::byte rhs) noexcept + inline constexpr etl::byte operator |(etl::byte lhs, etl::byte rhs) ETL_NOEXCEPT { return etl::byte(static_cast(lhs) | static_cast(rhs)); } @@ -101,7 +101,7 @@ namespace etl //************************************************************************* /// And. //************************************************************************* - inline constexpr etl::byte operator &(etl::byte lhs, etl::byte rhs) noexcept + inline constexpr etl::byte operator &(etl::byte lhs, etl::byte rhs) ETL_NOEXCEPT { return etl::byte(static_cast(lhs) & static_cast(rhs)); } @@ -109,7 +109,7 @@ namespace etl //************************************************************************* /// Exclusive Or. //************************************************************************* - inline constexpr etl::byte operator ^(etl::byte lhs, etl::byte rhs) noexcept + inline constexpr etl::byte operator ^(etl::byte lhs, etl::byte rhs) ETL_NOEXCEPT { return etl::byte(static_cast(lhs) ^ static_cast(rhs)); } @@ -117,7 +117,7 @@ namespace etl //************************************************************************* /// Or equals. //************************************************************************* - inline ETL_CONSTEXPR14 etl::byte& operator |=(etl::byte& lhs, etl::byte rhs) noexcept + inline ETL_CONSTEXPR14 etl::byte& operator |=(etl::byte& lhs, etl::byte rhs) ETL_NOEXCEPT { return lhs = lhs | rhs; } @@ -125,7 +125,7 @@ namespace etl //************************************************************************* /// And equals //************************************************************************* - inline ETL_CONSTEXPR14 etl::byte& operator &=(etl::byte& lhs, etl::byte rhs) noexcept + inline ETL_CONSTEXPR14 etl::byte& operator &=(etl::byte& lhs, etl::byte rhs) ETL_NOEXCEPT { return lhs = lhs & rhs; } @@ -133,7 +133,7 @@ namespace etl //************************************************************************* /// Exclusive or equals. //************************************************************************* - inline ETL_CONSTEXPR14 etl::byte& operator ^=(etl::byte& lhs, etl::byte rhs) noexcept + inline ETL_CONSTEXPR14 etl::byte& operator ^=(etl::byte& lhs, etl::byte rhs) ETL_NOEXCEPT { return lhs = lhs ^ rhs; } @@ -141,7 +141,7 @@ namespace etl //************************************************************************* /// Not. //************************************************************************* - inline constexpr etl::byte operator ~(etl::byte b) noexcept + inline constexpr etl::byte operator ~(etl::byte b) ETL_NOEXCEPT { return etl::byte(~static_cast(b)); } diff --git a/include/etl/initializer_list.h b/include/etl/initializer_list.h index 73b9470e..7cc87a76 100644 --- a/include/etl/initializer_list.h +++ b/include/etl/initializer_list.h @@ -71,7 +71,7 @@ namespace std //************************************************************************* /// Default constructor //************************************************************************* - constexpr initializer_list() noexcept + constexpr initializer_list() ETL_NOEXCEPT : pfirst(nullptr), plast(nullptr) { } @@ -79,7 +79,7 @@ namespace std //************************************************************************* /// Constructor //************************************************************************* - constexpr initializer_list(const T* pfirst_, const T* plast_) noexcept + constexpr initializer_list(const T* pfirst_, const T* plast_) ETL_NOEXCEPT : pfirst(pfirst_), plast(plast_) { } @@ -87,7 +87,7 @@ namespace std //************************************************************************* /// Get the beginning of the list. //************************************************************************* - constexpr const T* begin() const noexcept + constexpr const T* begin() const ETL_NOEXCEPT { return pfirst; } @@ -95,7 +95,7 @@ namespace std //************************************************************************* /// Get the end of the list. //************************************************************************* - constexpr const T* end() const noexcept + constexpr const T* end() const ETL_NOEXCEPT { return plast; } @@ -103,7 +103,7 @@ namespace std //************************************************************************* /// Get the size of the list. //************************************************************************* - constexpr size_t size() const noexcept + constexpr size_t size() const ETL_NOEXCEPT { return static_cast(plast - pfirst); } @@ -118,7 +118,7 @@ namespace std /// Get the beginning of the list. //************************************************************************* template - constexpr const T* begin(initializer_list init) noexcept + constexpr const T* begin(initializer_list init) ETL_NOEXCEPT { return init.begin(); } @@ -127,7 +127,7 @@ namespace std /// Get the end of the list. //************************************************************************* template - constexpr const T* end(initializer_list init) noexcept + constexpr const T* end(initializer_list init) ETL_NOEXCEPT { return init.end(); } @@ -154,7 +154,7 @@ namespace std //************************************************************************* /// Default constructor //************************************************************************* - constexpr initializer_list() noexcept + constexpr initializer_list() ETL_NOEXCEPT : pfirst(nullptr), length(0) { } @@ -162,7 +162,7 @@ namespace std //************************************************************************* /// Get the beginning of the list. //************************************************************************* - constexpr const T* begin() const noexcept + constexpr const T* begin() const ETL_NOEXCEPT { return pfirst; } @@ -170,7 +170,7 @@ namespace std //************************************************************************* /// Get the end of the list. //************************************************************************* - constexpr const T* end() const noexcept + constexpr const T* end() const ETL_NOEXCEPT { return pfirst + length; } @@ -178,7 +178,7 @@ namespace std //************************************************************************* /// Get the size of the list. //************************************************************************* - constexpr size_t size() const noexcept + constexpr size_t size() const ETL_NOEXCEPT { return length; } @@ -188,7 +188,7 @@ namespace std //************************************************************************* /// Constructor //************************************************************************* - constexpr initializer_list(const T* pfirst_, size_t length_) noexcept + constexpr initializer_list(const T* pfirst_, size_t length_) ETL_NOEXCEPT : pfirst(pfirst_) , length(length_) { @@ -202,7 +202,7 @@ namespace std /// Get the beginning of the list. //************************************************************************* template - constexpr const T* begin(initializer_list init) noexcept + constexpr const T* begin(initializer_list init) ETL_NOEXCEPT { return init.begin(); } @@ -211,7 +211,7 @@ namespace std /// Get the end of the list. //************************************************************************* template - constexpr const T* end(initializer_list init) noexcept + constexpr const T* end(initializer_list init) ETL_NOEXCEPT { return init.end(); } diff --git a/include/etl/private/chrono/day.h b/include/etl/private/chrono/day.h index 4a3aa2d3..fa5bb712 100644 --- a/include/etl/private/chrono/day.h +++ b/include/etl/private/chrono/day.h @@ -259,7 +259,7 @@ namespace etl /// Spaceship operator //*********************************************************************** #if ETL_USING_CPP20 - [[nodiscard]] inline constexpr auto operator <=>(const etl::chrono::day& d1, const etl::chrono::day& d2) noexcept + [[nodiscard]] inline constexpr auto operator <=>(const etl::chrono::day& d1, const etl::chrono::day& d2) ETL_NOEXCEPT { return (static_cast(d1) <=> static_cast(d2)); } @@ -341,9 +341,9 @@ namespace etl inline namespace chrono_literals { #if ETL_USING_VERBOSE_CHRONO_LITERALS - inline ETL_CONSTEXPR14 etl::chrono::day operator ""_day(unsigned long long d) noexcept + inline ETL_CONSTEXPR14 etl::chrono::day operator ""_day(unsigned long long d) ETL_NOEXCEPT #else - inline ETL_CONSTEXPR14 etl::chrono::day operator ""_d(unsigned long long d) noexcept + inline ETL_CONSTEXPR14 etl::chrono::day operator ""_d(unsigned long long d) ETL_NOEXCEPT #endif { return etl::chrono::day(static_cast(d)); diff --git a/include/etl/private/chrono/month.h b/include/etl/private/chrono/month.h index 890893bf..1ab694d4 100644 --- a/include/etl/private/chrono/month.h +++ b/include/etl/private/chrono/month.h @@ -261,7 +261,7 @@ namespace etl /// Spaceship operator //*********************************************************************** #if ETL_USING_CPP20 - [[nodiscard]] inline constexpr auto operator <=>(const etl::chrono::month& d1, const etl::chrono::month& d2) noexcept + [[nodiscard]] inline constexpr auto operator <=>(const etl::chrono::month& d1, const etl::chrono::month& d2) ETL_NOEXCEPT { return (static_cast(d1) <=> static_cast(d2)); } diff --git a/include/etl/private/chrono/month_day.h b/include/etl/private/chrono/month_day.h index f012d797..3ab52610 100644 --- a/include/etl/private/chrono/month_day.h +++ b/include/etl/private/chrono/month_day.h @@ -193,7 +193,7 @@ namespace etl //*********************************************************************** #if ETL_USING_CPP20 [[nodiscard]] inline constexpr auto operator <=>(const etl::chrono::month_day& lhs, - const etl::chrono::month_day& rhs) noexcept + const etl::chrono::month_day& rhs) ETL_NOEXCEPT { auto cmp = lhs.month() <=> rhs.month(); @@ -321,7 +321,7 @@ namespace etl /// Spaceship operator //*********************************************************************** #if ETL_USING_CPP20 - [[nodiscard]] inline constexpr auto operator <=>(const etl::chrono::month_day_last& mdl1, const etl::chrono::month_day_last& mdl2) noexcept + [[nodiscard]] inline constexpr auto operator <=>(const etl::chrono::month_day_last& mdl1, const etl::chrono::month_day_last& mdl2) ETL_NOEXCEPT { return (static_cast(mdl1.month()) <=> static_cast(mdl2.month())); } diff --git a/include/etl/private/chrono/time_point.h b/include/etl/private/chrono/time_point.h index 6faad033..204f4295 100644 --- a/include/etl/private/chrono/time_point.h +++ b/include/etl/private/chrono/time_point.h @@ -268,7 +268,7 @@ namespace etl //*********************************************************************** #if ETL_USING_CPP20 template - [[nodiscard]] constexpr auto operator <=>(const etl::chrono::time_point& lhs, const etl::chrono::time_point& rhs) noexcept + [[nodiscard]] constexpr auto operator <=>(const etl::chrono::time_point& lhs, const etl::chrono::time_point& rhs) ETL_NOEXCEPT { return (lhs.time_since_epoch() <=> rhs.time_since_epoch()); } diff --git a/include/etl/private/chrono/year.h b/include/etl/private/chrono/year.h index afef9cce..fd3d8096 100644 --- a/include/etl/private/chrono/year.h +++ b/include/etl/private/chrono/year.h @@ -259,7 +259,7 @@ namespace etl /// Spaceship operator //*********************************************************************** #if ETL_USING_CPP20 - [[nodiscard]] inline constexpr auto operator <=>(const etl::chrono::year& y1, const etl::chrono::year& y2) noexcept + [[nodiscard]] inline constexpr auto operator <=>(const etl::chrono::year& y1, const etl::chrono::year& y2) ETL_NOEXCEPT { return (static_cast(y1) <=> static_cast(y2)); } @@ -357,9 +357,9 @@ namespace etl /// Literal for years //*********************************************************************** #if ETL_USING_VERBOSE_CHRONO_LITERALS - inline ETL_CONSTEXPR14 etl::chrono::year operator ""_year(unsigned long long y) noexcept + inline ETL_CONSTEXPR14 etl::chrono::year operator ""_year(unsigned long long y) ETL_NOEXCEPT #else - inline ETL_CONSTEXPR14 etl::chrono::year operator ""_y(unsigned long long y) noexcept + inline ETL_CONSTEXPR14 etl::chrono::year operator ""_y(unsigned long long y) ETL_NOEXCEPT #endif { return etl::chrono::year(static_cast(y)); diff --git a/include/etl/private/variant_variadic.h b/include/etl/private/variant_variadic.h index 37f723a7..618e2366 100644 --- a/include/etl/private/variant_variadic.h +++ b/include/etl/private/variant_variadic.h @@ -268,7 +268,7 @@ namespace etl //*********************************** // holds_alternative. Forward declaration template - ETL_CONSTEXPR14 bool holds_alternative(const etl::variant& v) noexcept; + ETL_CONSTEXPR14 bool holds_alternative(const etl::variant& v) ETL_NOEXCEPT; //*********************************** // get. Forward declarations @@ -305,14 +305,14 @@ namespace etl #include "variant_select_do_operator.h" #endif - constexpr bool operator >(etl::monostate, etl::monostate) noexcept { return false; } - constexpr bool operator <(etl::monostate, etl::monostate) noexcept { return false; } - constexpr bool operator !=(etl::monostate, etl::monostate) noexcept { return false; } - constexpr bool operator <=(etl::monostate, etl::monostate) noexcept { return true; } - constexpr bool operator >=(etl::monostate, etl::monostate) noexcept { return true; } - constexpr bool operator ==(etl::monostate, etl::monostate) noexcept { return true; } + constexpr bool operator >(etl::monostate, etl::monostate) ETL_NOEXCEPT { return false; } + constexpr bool operator <(etl::monostate, etl::monostate) ETL_NOEXCEPT { return false; } + constexpr bool operator !=(etl::monostate, etl::monostate) ETL_NOEXCEPT { return false; } + constexpr bool operator <=(etl::monostate, etl::monostate) ETL_NOEXCEPT { return true; } + constexpr bool operator >=(etl::monostate, etl::monostate) ETL_NOEXCEPT { return true; } + constexpr bool operator ==(etl::monostate, etl::monostate) ETL_NOEXCEPT { return true; } #if ETL_USING_CPP20 && ETL_USING_STL && !(defined(ETL_DEVELOPMENT_OS_APPLE) && defined(ETL_COMPILER_CLANG)) - constexpr std::strong_ordering operator<=>(monostate, monostate) noexcept + constexpr std::strong_ordering operator<=>(monostate, monostate) ETL_NOEXCEPT { return std::strong_ordering::equal; } @@ -782,7 +782,7 @@ namespace etl /// Checks whether a valid value is currently stored. ///\return true if the value is valid, otherwise false. //*************************************************************************** - constexpr bool valueless_by_exception() const noexcept + constexpr bool valueless_by_exception() const ETL_NOEXCEPT { return type_id == variant_npos; } @@ -790,7 +790,7 @@ namespace etl //*************************************************************************** /// Gets the index of the type currently stored or variant_npos //*************************************************************************** - constexpr size_t index() const noexcept + constexpr size_t index() const ETL_NOEXCEPT { return type_id; } @@ -812,14 +812,14 @@ namespace etl ///\return true if it is the specified type, otherwise false. //*************************************************************************** template (), int> = 0> - constexpr bool is_type() const noexcept + constexpr bool is_type() const ETL_NOEXCEPT { return (type_id == index_of_type::value); } //*************************************************************************** template (), int> = 0> - constexpr bool is_type() const noexcept + constexpr bool is_type() const ETL_NOEXCEPT { return false; } @@ -838,7 +838,7 @@ namespace etl //*************************************************************************** /// Swaps this variant with another. //*************************************************************************** - void swap(variant& rhs) noexcept + void swap(variant& rhs) ETL_NOEXCEPT { variant temp(etl::move(*this)); *this = etl::move(rhs); @@ -1221,7 +1221,7 @@ namespace etl /// Checks if the variant v holds the alternative T. //*************************************************************************** template - ETL_CONSTEXPR14 bool holds_alternative(const etl::variant& v) noexcept + ETL_CONSTEXPR14 bool holds_alternative(const etl::variant& v) ETL_NOEXCEPT { constexpr size_t Index = etl::type_list_index_of_type, T>::value; @@ -1232,7 +1232,7 @@ namespace etl /// Checks if the variant v holds the alternative Index. //*************************************************************************** template - ETL_CONSTEXPR14 bool holds_alternative(const etl::variant& v) noexcept + ETL_CONSTEXPR14 bool holds_alternative(const etl::variant& v) ETL_NOEXCEPT { return (Index == v.index()); } @@ -1241,7 +1241,7 @@ namespace etl /// Checks if the variant v holds the alternative Index. (Runtime) //*************************************************************************** template - ETL_CONSTEXPR14 bool holds_alternative(size_t index, const etl::variant& v) noexcept + ETL_CONSTEXPR14 bool holds_alternative(size_t index, const etl::variant& v) ETL_NOEXCEPT { return (index == v.index()); } @@ -1351,7 +1351,7 @@ namespace etl //*************************************************************************** template< size_t Index, typename... TTypes > ETL_CONSTEXPR14 etl::add_pointer_t>> - get_if(etl::variant* pv) noexcept + get_if(etl::variant* pv) ETL_NOEXCEPT { if ((pv != nullptr) && (pv->index() == Index)) { @@ -1366,7 +1366,7 @@ namespace etl //*********************************** template< size_t Index, typename... TTypes > ETL_CONSTEXPR14 etl::add_pointer_t>> - get_if(const etl::variant* pv) noexcept + get_if(const etl::variant* pv) ETL_NOEXCEPT { if ((pv != nullptr) && (pv->index() == Index)) { @@ -1380,7 +1380,7 @@ namespace etl //*********************************** template< class T, typename... TTypes > - ETL_CONSTEXPR14 etl::add_pointer_t get_if(etl::variant* pv) noexcept + ETL_CONSTEXPR14 etl::add_pointer_t get_if(etl::variant* pv) ETL_NOEXCEPT { constexpr size_t Index = etl::type_list_index_of_type, T>::value; @@ -1396,7 +1396,7 @@ namespace etl //*********************************** template< typename T, typename... TTypes > - ETL_CONSTEXPR14 etl::add_pointer_t get_if(const etl::variant* pv) noexcept + ETL_CONSTEXPR14 etl::add_pointer_t get_if(const etl::variant* pv) ETL_NOEXCEPT { constexpr size_t Index = etl::type_list_index_of_type, T>::value; @@ -1561,7 +1561,7 @@ namespace etl using function_pointer = add_pointer_t; template - static constexpr function_pointer fptr() noexcept + static constexpr function_pointer fptr() ETL_NOEXCEPT { return &do_visit_single; } diff --git a/include/etl/string.h b/include/etl/string.h index 677f0e5f..9f462fdb 100644 --- a/include/etl/string.h +++ b/include/etl/string.h @@ -48,7 +48,7 @@ namespace etl { inline namespace string_literals { - inline constexpr etl::string_view operator ""_sv(const char* str, size_t length) noexcept + inline constexpr etl::string_view operator ""_sv(const char* str, size_t length) ETL_NOEXCEPT { return etl::string_view{ str, length }; } diff --git a/include/etl/u16string.h b/include/etl/u16string.h index 69740e25..78ce3953 100644 --- a/include/etl/u16string.h +++ b/include/etl/u16string.h @@ -46,7 +46,7 @@ namespace etl { inline namespace string_literals { - inline constexpr etl::u16string_view operator ""_sv(const char16_t* str, size_t length) noexcept + inline constexpr etl::u16string_view operator ""_sv(const char16_t* str, size_t length) ETL_NOEXCEPT { return etl::u16string_view{ str, length }; } diff --git a/include/etl/u32string.h b/include/etl/u32string.h index a3120a25..100cb2ec 100644 --- a/include/etl/u32string.h +++ b/include/etl/u32string.h @@ -46,7 +46,7 @@ namespace etl { inline namespace string_literals { - inline constexpr etl::u32string_view operator ""_sv(const char32_t* str, size_t length) noexcept + inline constexpr etl::u32string_view operator ""_sv(const char32_t* str, size_t length) ETL_NOEXCEPT { return etl::u32string_view{ str, length }; } diff --git a/include/etl/u8string.h b/include/etl/u8string.h index a64ee019..f82bbadd 100644 --- a/include/etl/u8string.h +++ b/include/etl/u8string.h @@ -49,7 +49,7 @@ namespace etl { inline namespace string_literals { - inline constexpr etl::u8string_view operator ""_sv(const char8_t* str, size_t length) noexcept + inline constexpr etl::u8string_view operator ""_sv(const char8_t* str, size_t length) ETL_NOEXCEPT { return etl::u8string_view{ str, length }; } diff --git a/include/etl/wstring.h b/include/etl/wstring.h index b17d45ac..b6cc173c 100644 --- a/include/etl/wstring.h +++ b/include/etl/wstring.h @@ -46,7 +46,7 @@ namespace etl { inline namespace string_literals { - inline constexpr etl::wstring_view operator ""_sv(const wchar_t* str, size_t length) noexcept + inline constexpr etl::wstring_view operator ""_sv(const wchar_t* str, size_t length) ETL_NOEXCEPT { return etl::wstring_view{ str, length }; }