> T min(T)(T firstval, T secondval) > { > return firstval < secondval ? firstval : secondval; > } > > This should have const on firstval and secondval, even if T is a mutable > type, but because of the current const rules, it can't. I must have missed something. What's wrong with this: T min(T)(const T a, const T b) { return a < b ? a : b; }