For example, I want to get a list of maximum values โโfrom two sequences, left and right , and save the results in max_seq , which are all previously defined and highlighted,
std::transform(left.begin(), left.end(), right.begin(), max_seq.begin(), &max<int>);
But this does not compile because the compiler says
note: template argument deduction/substitution failed
I know that I can wrap "std :: max" inside a struct or inside lambda . But is there a way to directly use std::max without wrappers?
source share