Implement the operator
I'm not sure of the contents of the transform struct in this case, but assuming it is:
struct transform { float mat[16]; }
Then the implementation can be something like:
std::ostream& operator<< (std::ostream& os, const tf::transform& t)
{
os << t.mat[0];
for(int i=1;i<16;++i) os << ',' << t.mat[i];
return os;
}