I am trying to call
template <typename FUNC> int execute ( FUNC ) { int a { 5 }; int b { 8 }; return FUNC ( a, b ); } with the following line:
std::cout << execute ( [] ( int a, int b ){ return a + b; }) << std::endl; with the following error:
error C2661: 'main::<lambda_5994edd6ba73caf12c83e036d510d0d8>::<lambda_5994edd6ba73caf12c83e036d510d0d8>': Keine überladene Funktion akzeptiert 2 Argumente So the question is what am i doing wrong? The error is German but it basically just says that the function doesn't take 2 parameters which it clearly should do
std::function<void(int, int)>and you are good to go