diff --git a/include/etl/private/delegate_cpp03.h b/include/etl/private/delegate_cpp03.h index 01218a89..8afb09c9 100644 --- a/include/etl/private/delegate_cpp03.h +++ b/include/etl/private/delegate_cpp03.h @@ -66,11 +66,11 @@ namespace etl //*********************************** template struct call_if_impl - { - TDelegate& d = static_cast(*this); - + { etl::optional call_if(TParam param) { + TDelegate& d = static_cast(*this); + etl::optional result; if (d.is_valid()) @@ -88,8 +88,8 @@ namespace etl { bool call_if() { - TDelegate& d = static_cast(*this); - + TDelegate& d = static_cast(*this); + if (d.is_valid()) { d(); @@ -106,10 +106,10 @@ namespace etl template struct call_if_impl { - TDelegate& d = static_cast(*this); - etl::optional call_if() { + TDelegate& d = static_cast(*this); + etl::optional result; if (d.is_valid()) @@ -435,7 +435,11 @@ namespace etl //************************************************************************* struct invocation_element { - invocation_element() = default; + invocation_element() + : object(ETL_NULLPTR) + , stub(ETL_NULLPTR) + { + } //*********************************************************************** invocation_element(void* object_, stub_type stub_) @@ -457,8 +461,8 @@ namespace etl } //*********************************************************************** - void* object = ETL_NULLPTR; - stub_type stub = ETL_NULLPTR; + void* object; + stub_type stub; }; //************************************************************************* @@ -823,7 +827,11 @@ namespace etl //************************************************************************* struct invocation_element { - invocation_element() = default; + invocation_element() + : object(ETL_NULLPTR) + , stub(ETL_NULLPTR) + { + } //*********************************************************************** invocation_element(void* object_, stub_type stub_) @@ -845,8 +853,8 @@ namespace etl } //*********************************************************************** - void* object = ETL_NULLPTR; - stub_type stub = ETL_NULLPTR; + void* object; + stub_type stub; }; //*************************************************************************