Arduino C++ compiler bug - "Can't assign lambda to std::function"


the compiler supports std::function, , supports lambda. can't assign lambda expression object std::function.

try statement:
std::for_each(v.begin(), v.end(), [](auto elem){cout elem;});

it should bug since lambda expression of type std::function.

hope fixed soon. can't live without lambda.

finally, found not support "auto" in lambda.

so works:
for_each(v.begin(), v.end(), [](int elem){elem;});

still bug lower priority.


Arduino Forum > Using Arduino > Programming Questions > Arduino C++ compiler bug - "Can't assign lambda to std::function"


arduino

Comments

Popular posts from this blog

Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode - Raspberry Pi Forums

class MPU6050 has no member named begin

missing filename after '-o'