i have a doubt in this code where the function is passed as reference that will it work if i pass lambda function?? i am really confused with it as in the previous video sort function was taught and sort function can accept a comparator function as well as a lambda function and this video is about explaining the implementation of that sort function i.e. how it works internally.
But if function is passed by reference in this, then i have a doubt that if we pass lambda function it will act as R-value i think and according to move semantics this method of reference is for L-value reference then how sort function works when we even pass lambda function or a comparator function as argument.
please help me by clearing this doubt.