File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -265,6 +265,8 @@ namespace
265265 Functor functor_static;
266266 const FunctorConst const_functor_static;
267267#endif
268+
269+ static auto global_lambda = [](int i, int j) { function_called = FunctionCalled::Lambda_Called; parameter_correct = (i == VALUE1) && (j == VALUE2); };
268270}
269271
270272namespace
@@ -539,7 +541,7 @@ namespace
539541#if ETL_USING_CPP17
540542 TEST_FIXTURE (SetupFixture, test_make_delegate_free_moveableonly_constexpr)
541543 {
542- constexpr auto d = etl::make_delegate<&free_moveableonly>);
544+ constexpr auto d = etl::make_delegate<&free_moveableonly>( );
543545
544546 MoveableOnlyData data;
545547 data.d = VALUE1;
@@ -567,10 +569,9 @@ namespace
567569 // *************************************************************************
568570 TEST_FIXTURE (SetupFixture, test_constexpr_lambda_int)
569571 {
570- constexpr auto lambda = [](int i, int j) { function_called = FunctionCalled::Lambda_Called; parameter_correct = (i == VALUE1) && (j == VALUE2); };
571- constexpr void (*func_ptr)(int , int ) = lambda;
572+ static constexpr void (*global_func_ptr)(int , int ) = global_lambda;
572573
573- auto d = etl::delegate<void (int , int )>::create<func_ptr >();
574+ auto d = etl::delegate<void (int , int )>::create<global_func_ptr >();
574575
575576 d (VALUE1, VALUE2);
576577
You can’t perform that action at this time.
0 commit comments