I am debugging some C++ code and I have a really large std::vector<floating_point_type> (float or double). In C++ code when I want the max value of the std::vector I can just use std::max_element(). So in gdb I tried to use the same code, but I got an error.
In gdb I used call std::max_element(x) and got an error message No symbol "max_element" in namespace "std".
Is there any way to get the max value of a vector in gdb?
I would also appreciate an explanation for why my attempt at using std::max_element was not working (perhaps std::max_element a header-only or inline function).