Absolute-difference function for std::size_t
This function computes absolute difference, not absolute value, so it shouldn't be called abs. absolute_difference? size_diff?

What will you use this function for? Are you using size_t for something other than sizes, so an absolute difference is meaningful?

std::max(a, b) - std::min(a, b) is harder to read than a simple conditional:

return a &gt; b ? a - b : b - a;


This function isn't specific to size_t; it can be defined for any type that supports comparison and subtraction:

template&lt;typename T&gt;
T abs_diff(T a, T b) {
  return a &gt; b ? a - b : b - a;
}


If you do want to define it only for size_t, using std::size_t would save some repetitions of std::.