Does this compile? Here you're calling writeFromNonRT() on a T*, when it should take a T.