to_literal function defined with exteral linkage, not inlined