There are also four range-based versions of clamp, that apply clamping to
a series of values. You could write them yourself with std::transform and
bind, like this: std::transform(first,last,out,bind(clamp(_1,lo,hi))),
but they are provided here for your convenience.