Here is my (simplified) attempt to implement a ranges::min_element version that would work for both lvalue and rvalue arguments:
ranges::min_element
#include