Refactored template parameter constraints.