fix the bug caused by rename _GEN_* to GEN_*_IMPL
add decltype