Skip to content

Commit 5b01a4b

Browse files
committed
Changed comment
Simplified unit test
1 parent 31740b8 commit 5b01a4b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

include/etl/utility.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ namespace etl
679679
#if ETL_USING_CPP17
680680
//*****************************************************************************
681681
// Wraps a functor with a static free function at compile time.
682-
// Creates a static member 'function' that calls the specified functor.
682+
// Creates a static member 'call' that calls the specified functor.
683683
//*****************************************************************************
684684
template <auto& Instance>
685685
struct functor_as_static
@@ -693,7 +693,7 @@ namespace etl
693693

694694
//*****************************************************************************
695695
// Wraps a member function with a static free function at compile time.
696-
// Creates a static member function that calls the specified member function.
696+
// Creates a static member 'call' that calls the specified member function.
697697
//*****************************************************************************
698698
template <auto Method, auto& Instance>
699699
struct member_function_as_static

test/test_utility.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,9 +447,11 @@ namespace
447447
//*************************************************************************
448448
TEST(test_function_ptr_as_functor)
449449
{
450-
constexpr decltype(TestGlobal)* fptr = TestGlobal;
450+
using function_type = decltype(TestGlobal);
451451

452-
constexpr etl::function_ptr_as_functor<decltype(TestGlobal)> fpaf(fptr);
452+
constexpr function_type* fptr = TestGlobal;
453+
454+
constexpr etl::function_ptr_as_functor<function_type> fpaf(fptr);
453455

454456
CHECK_EQUAL(2, fpaf(1));
455457
}

0 commit comments

Comments
 (0)