From 1c9d3b7529de0d9b691f87a9ca3494c96a410ff8 Mon Sep 17 00:00:00 2001 From: Stefan Pranger Date: Sun, 7 Feb 2021 15:21:43 +0100 Subject: [PATCH] fixed output of player coalitions --- src/storm/logic/PlayerCoalition.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/storm/logic/PlayerCoalition.cpp b/src/storm/logic/PlayerCoalition.cpp index 45cc683e9..fccd567c3 100644 --- a/src/storm/logic/PlayerCoalition.cpp +++ b/src/storm/logic/PlayerCoalition.cpp @@ -13,13 +13,17 @@ namespace storm { return _playerIds; } - std::ostream& operator<<(std::ostream& stream, PlayerCoalition const& coalition) { - //bool firstItem = true; - //for (auto const& id : coalition._playerIds) { - // //if(firstItem) { firstItem = false; } else { stream << ","; } - // stream << id; - //} - return stream; + std::ostream& operator<<(std::ostream& out, PlayerCoalition const& coalition) { + bool firstItem = true; + for (auto const& player : coalition._playerIds) { + if(firstItem) { firstItem = false; } else { out << ","; } + if (player.type() == typeid(std::string)) { + out << boost::get(player); + } else { + out << boost::get(player); + } + } + return out; } } }