improvements to detail::constchar_helper