diff --git a/include/etl/span.h b/include/etl/span.h index 2f9b22c8..290ffd26 100644 --- a/include/etl/span.h +++ b/include/etl/span.h @@ -232,9 +232,9 @@ namespace etl } //************************************************************************* - /// Assign from a view. + /// Assign from a span. //************************************************************************* - ETL_CONSTEXPR14 span& operator =(const span& other) ETL_NOEXCEPT + ETL_CONSTEXPR span& operator =(const span& other) ETL_NOEXCEPT { mbegin = other.mbegin; mend = other.mend; @@ -276,10 +276,7 @@ namespace etl typename etl::enable_if >::type subspan() const { - element_type* pb = mbegin + OFFSET; - element_type* pe = mend; - - return etl::span(pb, pe); + return etl::span(mbegin + OFFSET, mend); } //************************************************************************* @@ -291,10 +288,7 @@ namespace etl typename etl::enable_if >::type subspan() const { - element_type* pb = mbegin + OFFSET; - element_type* pe = pb + COUNT; - - return etl::span(pb, pe); + return etl::span(mbegin + OFFSET, mbegin + OFFSET + COUNT); } //************************************************************************* diff --git a/include/etl/version.h b/include/etl/version.h index 7c7740dd..a4acf15e 100644 --- a/include/etl/version.h +++ b/include/etl/version.h @@ -39,7 +39,7 @@ SOFTWARE. #define ETL_VERSION_MAJOR 17 #define ETL_VERSION_MINOR 4 -#define ETL_VERSION_PATCH 1 +#define ETL_VERSION_PATCH 2 #define ETL_VERSION ETL_STRINGIFY(ETL_VERSION_MAJOR) "." ETL_STRINGIFY(ETL_VERSION_MINOR) "." ETL_STRINGIFY(ETL_VERSION_PATCH) #define ETL_VERSION_W ETL_STRINGIFY(ETL_VERSION_MAJOR) L"." ETL_STRINGIFY(ETL_VERSION_MINOR) L"." ETL_STRINGIFY(ETL_VERSION_PATCH) #define ETL_VERSION_U16 ETL_STRINGIFY(ETL_VERSION_MAJOR) u"." ETL_STRINGIFY(ETL_VERSION_MINOR) u"." ETL_STRINGIFY(ETL_VERSION_PATCH) diff --git a/library.json b/library.json index 1c6daf5e..86f8ce30 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "Embedded Template Library", - "version": "17.4.1", + "version": "17.4.2", "authors": { "name": "John Wellbelove", "email": "john.wellbelove@etlcpp.com" diff --git a/library.properties b/library.properties index 1f5c48f3..31d44ffa 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Embedded Template Library -version=17.4.1 +version=17.4.2 author= John Wellbelove maintainer=John Wellbelove license=MIT diff --git a/support/Release notes.txt b/support/Release notes.txt index 0795115c..eff44a06 100644 --- a/support/Release notes.txt +++ b/support/Release notes.txt @@ -1,3 +1,7 @@ +=============================================================================== +17.4.2 +Make etl::span::subspan functions compatible with C++11 constexpr + =============================================================================== 17.4.1 Removed double definition of default case in switch.