Extend range to generic template