diff --git a/include/etl/private/delegate_cpp11.h b/include/etl/private/delegate_cpp11.h index ca5ea37f..346e022b 100644 --- a/include/etl/private/delegate_cpp11.h +++ b/include/etl/private/delegate_cpp11.h @@ -55,6 +55,7 @@ Original publication: https://www.codeproject.com/Articles/1170503/The-Impossibl #include "../function_traits.h" #include "../utility.h" #include "../optional.h" +#include "../type_list.h" namespace etl { @@ -119,6 +120,9 @@ namespace etl { public: + using return_type = TReturn; + using argument_types = etl::type_list; + //************************************************************************* /// Default constructor. //************************************************************************* diff --git a/support/Release notes.txt b/support/Release notes.txt index b15a0039..7264cd87 100644 --- a/support/Release notes.txt +++ b/support/Release notes.txt @@ -3,13 +3,8 @@ Updates: Added 'emplace' constructor to etl::optional -Added etl::crc8_opensafety -Added etl::crc16_opensafety_a and etl::crc16_opensafety_b -Added etl::crc64_iso -Added etl::type_lists_are_convertible -Made etl::closure constexpr for C++14 -Made invocation of delegate consrexpr for C++14 -#1132 Request: Make type_def Methods Noexcept +Added etl::delegate_observable +Added return_type and argument_types to etl::delegate #1054 Using #pragma once #1159 etl::fsm helper to check states id sequence at compile time #1160 Feature request: rounded division (similar to scaled rounding) @@ -28,6 +23,18 @@ Pull Requests: #955 Implements deferred callback timer with optional priority #1147 Fix compile error in closure.h by using etl::forward +=============================================================================== +20.42.2 + +Updates: +Added etl::crc8_opensafety +Added etl::crc16_opensafety_a and etl::crc16_opensafety_b +Added etl::crc64_iso +Added etl::type_lists_are_convertible +Made etl::closure constexpr for C++14 +Made invocation of delegate consrexpr for C++14 +#1132 Request: Make type_def Methods Noexcept + =============================================================================== 20.42.1 diff --git a/test/test_delegate.cpp b/test/test_delegate.cpp index 302787b5..a4fdf6c8 100644 --- a/test/test_delegate.cpp +++ b/test/test_delegate.cpp @@ -36,6 +36,7 @@ SOFTWARE. #include #include #include +#include namespace { @@ -287,6 +288,18 @@ namespace SUITE(test_delegate) { + //************************************************************************* + TEST_FIXTURE(SetupFixture, test_delegate_types) + { + using Delegate = etl::delegate; + + // Check the return type. + CHECK_TRUE((std::is_same::value)); + + // Check the argument types. + CHECK_TRUE((std::is_same>::value)); + } + //************************************************************************* TEST_FIXTURE(SetupFixture, test_is_valid_false) {