Why max "long" - the signedness of it confuses me. What is this clamping "dim" to?
If sizeof(unsigned) < sizeof(long), this always returns "dim", so the only interesting case is if sizeof(unsigned) == sizeof(long), where this clamps dim in the bottom 1/2 of the unsigned ints. Intended?
+unsigned clamp_dim(unsigned dim) :numeric_ limits< long>:: max(), dim);
+{
+ return std::min<unsigned long>(std:
+}
Why max "long" - the signedness of it confuses me. What is this clamping "dim" to?
If sizeof(unsigned) < sizeof(long), this always returns "dim", so the only interesting case is if sizeof(unsigned) == sizeof(long), where this clamps dim in the bottom 1/2 of the unsigned ints. Intended?