templated ostream