aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-10-04 07:41:52 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-10-04 07:41:52 +0200
commit3ca248eb8f6ebeca4ab0c5fdc67c768769a058ed (patch)
tree6892b5305b535e639db68c786e5a74d53fe05487
parente2cd8cb2e645b8775253f73df92e484e19a56427 (diff)
Work around lack of C++17 ctor in butl::optional
-rw-r--r--bbot/agent/machine.cxx10
1 files changed, 10 insertions, 0 deletions
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<string> 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.
//