From 3ca248eb8f6ebeca4ab0c5fdc67c768769a058ed Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 4 Oct 2022 07:41:52 +0200 Subject: Work around lack of C++17 ctor in butl::optional --- bbot/agent/machine.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bbot/agent/machine.cxx b/bbot/agent/machine.cxx index 911d65b..443ab28 100644 --- a/bbot/agent/machine.cxx +++ b/bbot/agent/machine.cxx @@ -309,11 +309,21 @@ namespace bbot } else { + // @@ TMP: libstud-optional issue #1. + // +#if 0 auto add = [&os] (string o, optional v = {}) { os.push_back (move (o)); if (v) os.push_back (move (*v)); }; +#else + auto add = [&os] (string o, string v = {}) + { + os.push_back (move (o)); + if (!v.empty ()) os.push_back (move (v)); + }; +#endif // Network. // -- cgit v1.1