am a27cb623: Merge "Use C++ template for min/max"

* commit 'a27cb623901d79be1007b0803898086a12ce731b':
  Use C++ template for min/max