First of all, I hope this is the right place to ask this kind of question. Pls, direct me if it is not.
This is probably the most basic question in c++. But, I have no clue what is the meaning of the line in the 'for' loop from the below code, and not sure how to search for it as well.
I guess 'for loop' iterates over the output of the vmap.findByFilter.
But what I do not understand is the input arguments([](const WhiteLine& white_line){return true;}) inside of it.
Can someone explain what does it do?
for (const auto& white_line : vmap.findByFilter([](const WhiteLine& white_line){return true;}))
Below is where the for loop is placed.
visualization_msgs::MarkerArray createWhiteLineMarkerArray(const VectorMap& vmap, Color white_color,
Color yellow_color){
visualization_msgs::MarkerArray marker_array;
int id = 0;
for (const auto& white_line : vmap.findByFilter([](const WhiteLine& white_line){return true;}))
{// some codes ~~ ~~~~ }
}