Updated versions & memory.h

This commit is contained in:
John Wellbelove 2022-11-09 09:52:09 +00:00
parent 02a3083015
commit 7184e57a19
8 changed files with 99 additions and 20 deletions

View File

@ -1,6 +1,6 @@
{
"name": "Embedded Template Library - Arduino",
"version": "20.35.0",
"version": "20.35.1",
"authors": {
"name": "John Wellbelove",
"email": "john.wellbelove@etlcpp.com"

View File

@ -1,5 +1,5 @@
name=Embedded Template Library - Arduino
version=20.35.0
version=20.35.1
author= John Wellbelove <john.wellbelove@etlcpp.com>
maintainer=John Wellbelove <john.wellbelove@etlcpp.com>
license=MIT

View File

@ -1307,10 +1307,23 @@ namespace etl
#if ETL_USING_CPP11
//*********************************
unique_ptr(unique_ptr&& p_) ETL_NOEXCEPT
: p(p_.release())
, deleter(etl::move(p_.deleter))
unique_ptr(unique_ptr&& other) ETL_NOEXCEPT
{
if (&other != this)
{
p = other.release();
deleter = etl::move(other.deleter);
}
}
#else
//*********************************
unique_ptr(unique_ptr& other) ETL_NOEXCEPT
{
if (&other != this)
{
p = other.release();
deleter = other.deleter;
}
}
#endif
@ -1330,6 +1343,13 @@ namespace etl
, deleter(etl::move(deleter_))
{
}
template <typename U, typename E>
unique_ptr(unique_ptr<U, E>&& u) ETL_NOEXCEPT
: p(u.release())
, deleter(etl::forward<E>(u.get_deleter()))
{
}
#endif
template <typename U, typename E>
@ -1419,9 +1439,25 @@ namespace etl
#if ETL_USING_CPP11
//*********************************
unique_ptr& operator =(unique_ptr&& p_) ETL_NOEXCEPT
unique_ptr& operator =(unique_ptr&& other) ETL_NOEXCEPT
{
reset(p_.release());
if (&other != this)
{
reset(other.release());
deleter = etl::move(other.deleter);
}
return *this;
}
#else
//*********************************
unique_ptr& operator =(unique_ptr& other) ETL_NOEXCEPT
{
if (&other != this)
{
reset(other.release());
deleter = other.deleter;
}
return *this;
}
@ -1471,7 +1507,7 @@ namespace etl
typedef T& reference;
//*********************************
ETL_CONSTEXPR unique_ptr() ETL_NOEXCEPT
ETL_CONSTEXPR unique_ptr() ETL_NOEXCEPT
: p(ETL_NULLPTR)
{
}
@ -1484,17 +1520,31 @@ namespace etl
#if ETL_USING_CPP11
//*********************************
unique_ptr(unique_ptr&& p_) ETL_NOEXCEPT
: p(p_.release())
, deleter(etl::move(p_.deleter))
unique_ptr(unique_ptr&& other) ETL_NOEXCEPT
{
if (&other != this)
{
p = other.release();
deleter = etl::move(other.deleter);
}
}
#else
//*********************************
unique_ptr(unique_ptr& other) ETL_NOEXCEPT
{
if (&other != this)
{
p = other.release();
deleter = other.deleter;
}
}
#endif
//*********************************
unique_ptr(pointer p_, typename etl::conditional<etl::is_reference<TDeleter>::value,
TDeleter,
typename etl::add_lvalue_reference<const TDeleter>::type>::type deleter_) ETL_NOEXCEPT
unique_ptr(pointer p_,
typename etl::conditional<etl::is_reference<TDeleter>::value,
TDeleter,
typename etl::add_lvalue_reference<const TDeleter>::type>::type deleter_) ETL_NOEXCEPT
: p(p_)
, deleter(deleter_)
{
@ -1507,6 +1557,13 @@ namespace etl
, deleter(etl::move(deleter_))
{
}
template <typename U, typename E>
unique_ptr(unique_ptr<U, E>&& u) ETL_NOEXCEPT
: p(u.release())
, deleter(etl::forward<E>(u.get_deleter()))
{
}
#endif
//*********************************
@ -1588,9 +1645,25 @@ namespace etl
#if ETL_USING_CPP11
//*********************************
unique_ptr& operator =(unique_ptr&& p_) ETL_NOEXCEPT
unique_ptr& operator =(unique_ptr&& other) ETL_NOEXCEPT
{
reset(p_.release());
if (&other != this)
{
reset(other.release());
deleter = etl::move(other.deleter);
}
return *this;
}
#else
//*********************************
unique_ptr& operator =(unique_ptr& other) ETL_NOEXCEPT
{
if (&other != this)
{
reset(other.release());
deleter = other.deleter;
}
return *this;
}

View File

@ -40,7 +40,7 @@ SOFTWARE.
#define ETL_VERSION_MAJOR 20
#define ETL_VERSION_MINOR 35
#define ETL_VERSION_PATCH 0
#define ETL_VERSION_PATCH 1
#define ETL_VERSION ETL_STRING(ETL_VERSION_MAJOR) "." ETL_STRING(ETL_VERSION_MINOR) "." ETL_STRING(ETL_VERSION_PATCH)
#define ETL_VERSION_W ETL_WIDE_STRING(ETL_VERSION_MAJOR) L"." ETL_WIDE_STRING(ETL_VERSION_MINOR) L"." ETL_WIDE_STRING(ETL_VERSION_PATCH)

View File

@ -1,6 +1,6 @@
{
"name": "Embedded Template Library",
"version": "20.35.0",
"version": "20.35.1",
"authors": {
"name": "John Wellbelove",
"email": "john.wellbelove@etlcpp.com"

View File

@ -1,5 +1,5 @@
name=Embedded Template Library
version=20.35.0
version=20.35.1
author= John Wellbelove <john.wellbelove@etlcpp.com>
maintainer=John Wellbelove <john.wellbelove@etlcpp.com>
license=MIT

View File

@ -1,3 +1,9 @@
===============================================================================
20.35.1
#628 Fixed set of ETL_NO_STL flag in meson.build
#631 unique_ptr derived copy or move to base does not compile
Removed duplicate include in etl::array_view
===============================================================================
20.35.0
#596 Helper functions to convert strings to numeric values. etl::to_arithmetic

View File

@ -1 +1 @@
20.35.0
20.35.1