aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2024-07-05 23:12:31 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2024-07-05 23:36:26 +0300
commit61a7620da35c0773a4407b7890baa8a1868c70fa (patch)
tree2c07bcba7bda5fd3692e576ee4d0e06b999ed9f6
parent0136a6da14f77cfd3d0bda14fbe5f733c2c394a2 (diff)
Add disabled test for butl::optional use case described in libstud-optional GH issue #1remove-outdated-code
-rw-r--r--tests/optional/driver.cxx26
1 files changed, 22 insertions, 4 deletions
diff --git a/tests/optional/driver.cxx b/tests/optional/driver.cxx
index da09cf5..63254b5 100644
--- a/tests/optional/driver.cxx
+++ b/tests/optional/driver.cxx
@@ -2,7 +2,8 @@
// license : MIT; see accompanying LICENSE file
#include <vector>
-#include <utility> // move()
+#include <string>
+#include <utility> // move(), pair
#include <libbutl/optional.hxx>
@@ -27,7 +28,24 @@ main ()
{
using butl::optional;
- optional<move_only> r;
- vector<optional<move_only>> rs;
- rs.emplace_back (move (r));
+ {
+ optional<move_only> r;
+ vector<optional<move_only>> rs;
+ rs.emplace_back (move (r));
+ }
+
+ // See https://github.com/libstud/libstud-optional/issues/1 for details.
+ //
+#if 0
+ {
+ vector<pair<string, optional<string>>> options;
+ auto add = [&options] (string o, optional<string> v = {})
+ {
+ options.emplace_back (move (o), move (v));
+ };
+
+ add ("-usb");
+ add ("-device", "usb-kbd");
+ }
+#endif
}