Specilization for const index

Signed-off-by: Thynson <lanxingcan@gmail.com>