diff --git a/include/etl/utility.h b/include/etl/utility.h index b98ca3d70..3e371b40d 100644 --- a/include/etl/utility.h +++ b/include/etl/utility.h @@ -679,7 +679,7 @@ namespace etl #if ETL_USING_CPP17 //***************************************************************************** // Wraps a functor with a static free function at compile time. - // Creates a static member 'function' that calls the specified functor. + // Creates a static member 'call' that calls the specified functor. //***************************************************************************** template struct functor_as_static @@ -693,7 +693,7 @@ namespace etl //***************************************************************************** // Wraps a member function with a static free function at compile time. - // Creates a static member function that calls the specified member function. + // Creates a static member 'call' that calls the specified member function. //***************************************************************************** template struct member_function_as_static diff --git a/test/test_utility.cpp b/test/test_utility.cpp index 07a2818e3..223058547 100644 --- a/test/test_utility.cpp +++ b/test/test_utility.cpp @@ -447,9 +447,11 @@ namespace //************************************************************************* TEST(test_function_ptr_as_functor) { - constexpr decltype(TestGlobal)* fptr = TestGlobal; + using function_type = decltype(TestGlobal); - constexpr etl::function_ptr_as_functor fpaf(fptr); + constexpr function_type* fptr = TestGlobal; + + constexpr etl::function_ptr_as_functor fpaf(fptr); CHECK_EQUAL(2, fpaf(1)); }