diff --git a/ostream.cpp b/ostream.cpp index f51861d..6543377 100644 --- a/ostream.cpp +++ b/ostream.cpp @@ -135,27 +135,12 @@ operator<< (std::ostream &os, const VkPhysicalDeviceFeatures &f) std::ostream& cruft::vk::operator<< (std::ostream &os, const physical_device &d) { - os << "physical_device { "; - - os << "extensions: [ "; - const auto &extensions = d.extensions (); - std::copy (std::cbegin (extensions), - std::cend (extensions), - util::infix_iterator (os, ", ")); - os << " ], "; - - os << " properties: " << d.properties () - << ", features: " << d.features (); - - os << ", queues: "; - const auto &queues = d.queue_families (); - std::copy ( - std::cbegin (queues), - std::cend (queues), - util::infix_iterator (os, ", ") - ); - - return os << "}"; + return os << "physical_device { " + << "extensions: [ " << util::make_infix (d.extensions ()) << " ]" + << ", properties: " << d.properties () + << ", features: " << d.features () + << ", queues: [ " << util::make_infix (d.queue_families ()) << " ]" + << " }"; }