The C++ committee answer to this is to use "partial template specialization". I'm hoping all the standard libraries I use such as Boost etc have already done this to avoid code bloat.
But I agree that it would be nice if the compiler did this automatically.
But I agree that it would be nice if the compiler did this automatically.