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.
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.
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
Post a Comment