File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ template <>
125125struct std ::formatter<dsf::Agent> {
126126 constexpr auto parse (std::format_parse_context& ctx) { return ctx.begin (); }
127127 template <typename FormatContext>
128- auto format (const dsf::Agent& agent, FormatContext& ctx) const {
128+ auto format (const dsf::Agent& agent, FormatContext&& ctx) const {
129129 auto const strItinerary = agent.trip ().empty () ? std::string (" RANDOM" )
130130 : std::to_string (agent.itineraryId ());
131131 return std::format_to (ctx.out (),
@@ -140,4 +140,4 @@ struct std::formatter<dsf::Agent> {
140140 agent.speed (),
141141 agent.distance ());
142142 }
143- };
143+ };
Original file line number Diff line number Diff line change @@ -220,8 +220,8 @@ namespace dsf {
220220template <>
221221struct std ::formatter<dsf::Street> {
222222 constexpr auto parse (std::format_parse_context& ctx) { return ctx.begin (); }
223- template <typename fmtContext >
224- auto format (const dsf::Street& street, fmtContext & ctx) const {
223+ template <typename FormatContext >
224+ auto format (const dsf::Street& street, FormatContext& & ctx) const {
225225 return std::format_to (
226226 ctx.out (),
227227 " Street \" {}\" ({}: {} -> {}). {} m - {} m/s - {} lanes - {} agents ({} exiting)" ,
@@ -235,4 +235,4 @@ struct std::formatter<dsf::Street> {
235235 street.nAgents (),
236236 street.nExitingAgents ());
237237 }
238- };
238+ };
Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ template <>
170170struct std ::formatter<dsf::TrafficLightCycle> {
171171 constexpr auto parse (std::format_parse_context& ctx) { return ctx.begin (); }
172172 template <typename FormatContext>
173- auto format (const dsf::TrafficLightCycle& cycle, FormatContext& ctx) const {
173+ auto format (const dsf::TrafficLightCycle& cycle, FormatContext&& ctx) const {
174174 return std::format_to (ctx.out (),
175175 " TrafficLightCycle (green time: {} - phase shift: {})" ,
176176 cycle.greenTime (),
@@ -182,7 +182,7 @@ template <>
182182struct std ::formatter<dsf::TrafficLight> {
183183 constexpr auto parse (std::format_parse_context& ctx) { return ctx.begin (); }
184184 template <typename FormatContext>
185- auto format (const dsf::TrafficLight& tl, FormatContext& ctx) const {
185+ auto format (const dsf::TrafficLight& tl, FormatContext&& ctx) const {
186186 std::string strCycles;
187187 for (auto const & [streetId, cycles] : tl.cycles ()) {
188188 std::string strStreetCycles{std::format (" \t Street {}:\n " , streetId)};
@@ -201,4 +201,4 @@ struct std::formatter<dsf::TrafficLight> {
201201 tl.counter (),
202202 strCycles);
203203 }
204- };
204+ };
You can’t perform that action at this time.
0 commit comments