update c++ templates to include namespace