matrix stream output now uses std::basic_ostream