Updated version numbers

This commit is contained in:
John Wellbelove 2020-12-01 13:19:44 +00:00
parent 6144794221
commit fad6e4d800
6 changed files with 43 additions and 20 deletions

View File

@ -118,7 +118,7 @@ namespace etl
/// Create from function (Compile time).
//*************************************************************************
template <TReturn(*Method)(TParams...)>
ETL_CONSTEXPR14 static delegate create()
constexpr static delegate create()
{
return delegate(ETL_NULLPTR, function_stub<Method>);
}
@ -127,7 +127,7 @@ namespace etl
/// Create from Lambda or Functor.
//*************************************************************************
template <typename TLambda, typename = typename etl::enable_if<etl::is_class<TLambda>::value, void>::type>
ETL_CONSTEXPR14 static delegate create(const TLambda& instance)
constexpr static delegate create(const TLambda& instance)
{
return delegate((void*)(&instance), lambda_stub<TLambda>);
}
@ -136,7 +136,7 @@ namespace etl
/// Create from instance method (Run time).
//*************************************************************************
template <typename T, TReturn(T::*Method)(TParams...)>
ETL_CONSTEXPR14 static delegate create(T& instance)
constexpr static delegate create(T& instance)
{
return delegate((void*)(&instance), method_stub<T, Method>);
}
@ -152,7 +152,7 @@ namespace etl
/// Create from const instance method (Run time).
//*************************************************************************
template <typename T, TReturn(T::*Method)(TParams...) const>
ETL_CONSTEXPR14 static delegate create(const T& instance)
constexpr static delegate create(const T& instance)
{
return delegate((void*)(&instance), const_method_stub<T, Method>);
}
@ -161,13 +161,13 @@ namespace etl
/// Disable create from rvalue instance method (Run time).
//*************************************************************************
template <typename T, TReturn(T::*Method)(TParams...) const>
ETL_CONSTEXPR14 static delegate create(T&& instance) = delete;
constexpr static delegate create(T&& instance) = delete;
//*************************************************************************
/// Create from instance method (Compile time).
//*************************************************************************
template <typename T, T& Instance, TReturn(T::*Method)(TParams...)>
ETL_CONSTEXPR14 static delegate create()
constexpr static delegate create()
{
return delegate(method_instance_stub<T, Instance, Method>);
}
@ -176,7 +176,7 @@ namespace etl
/// Create from const instance method (Compile time).
//*************************************************************************
template <typename T, T const& Instance, TReturn(T::*Method)(TParams...) const>
ETL_CONSTEXPR14 static delegate create()
constexpr static delegate create()
{
return delegate(const_method_instance_stub<T, Instance, Method>);
}
@ -187,7 +187,7 @@ namespace etl
/// At the time of writing, GCC appears to have trouble with this.
//*************************************************************************
template <typename T, T& Instance>
ETL_CONSTEXPR14 static delegate create()
constexpr static delegate create()
{
return delegate(operator_instance_stub<T, Instance>);
}
@ -262,7 +262,7 @@ namespace etl
invocation_element() = default;
//***********************************************************************
invocation_element(void* object_, stub_type stub_)
constexpr invocation_element(void* object_, stub_type stub_)
: object(object_)
, stub(stub_)
{
@ -288,25 +288,23 @@ namespace etl
//*************************************************************************
/// Constructs a delegate from an object and stub.
//*************************************************************************
ETL_CONSTEXPR14 delegate(void* object, stub_type stub)
constexpr delegate(void* object, stub_type stub)
: invocation(object, stub)
{
invocation.object = object;
invocation.stub = stub;
}
//*************************************************************************
/// Constructs a delegate from a stub.
//*************************************************************************
ETL_CONSTEXPR14 delegate(stub_type stub)
constexpr delegate(stub_type stub)
: invocation(ETL_NULLPTR, stub)
{
invocation.object = ETL_NULLPTR;
invocation.stub = stub;
}
//*************************************************************************
/// Assign from an object and stub.
//*************************************************************************
ETL_CONSTEXPR14 void assign(void* object, stub_type stub)
void assign(void* object, stub_type stub)
{
invocation.object = object;
invocation.stub = stub;

View File

@ -38,8 +38,8 @@ SOFTWARE.
///\ingroup utilities
#define ETL_VERSION_MAJOR 19
#define ETL_VERSION_MINOR 2
#define ETL_VERSION_PATCH 1
#define ETL_VERSION_MINOR 3
#define ETL_VERSION_PATCH 0
#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)

View File

@ -1,6 +1,6 @@
{
"name": "Embedded Template Library",
"version": "19.2.1",
"version": "19.3.0",
"author s": {
"name": "John Wellbelove",
"email": "john.wellbelove@etlcpp.com"

View File

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

View File

@ -1,3 +1,7 @@
===============================================================================
19.3.0
More constexpr, template aliases and inline variables.
===============================================================================
19.2.1
Fixed version number retrieval from Github.

21
temp/fsm-patch.txt Normal file
View File

@ -0,0 +1,21 @@
From 18713df17b39ef01707a5891f1d26b39b74ca8a3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Chodzikiewicz?= <mchodzikiewicz@gmail.com>
Date: Mon, 30 Nov 2020 17:06:02 +0100
Subject: [PATCH] Add assertion for fsm's state array order
---
include/etl/fsm.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/etl/fsm.h b/include/etl/fsm.h
index 84bb34c..55a41f7 100644
--- a/include/etl/fsm.h
+++ b/include/etl/fsm.h
@@ -230,6 +230,7 @@ namespace etl
for (etl::fsm_state_id_t i = 0; i < size; ++i)
{
ETL_ASSERT((state_list[i] != nullptr), ETL_ERROR(etl::fsm_null_state_exception));
+ ETL_ASSERT((state_list[i]->state_id == i),"State list is in incorrect order");
state_list[i]->set_fsm_context(*this);
}
}
--
2.29.2