Working on C++ min_max for signals.