From 53b304cb7a9beeb2339999f23b7c8dc8c13db416 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 25 May 2020 01:39:15 -0700 Subject: [PATCH] ircd::json::printer: Make return an lvalue for leeward access. --- ircd/json.cc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ircd/json.cc b/ircd/json.cc index ea62c524f..263ca5228 100644 --- a/ircd/json.cc +++ b/ircd/json.cc @@ -484,7 +484,12 @@ const }; }}; - return karma::generate(begin(out), gg | eps[throws], std::forward(a)...); + const auto ret + { + karma::generate(begin(out), gg | eps[throws], std::forward(a)...) + }; + + return ret; } template @@ -514,7 +519,12 @@ const }; }}; - return karma::generate(begin(out), gg | eps[throws]); + const auto ret + { + karma::generate(begin(out), gg | eps[throws]) + }; + + return ret; } template