gcc template typename issue fixed