C++ fix: selectively generate transfer functions