summaryrefslogtreecommitdiff
path: root/cli-examples/features
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-06-30 14:25:16 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-06-30 16:29:57 +0300
commit1f83704a70b9c4065a5eb9f65e94919415d238ae (patch)
tree70d6fc1c1aeffe943e8fb4e48154b71da0d473a1 /cli-examples/features
parentbe64f285c1c74567353838f37203c63d3d8e27b5 (diff)
Add support for using bool with std::vector, std::set, and std::map
Diffstat (limited to 'cli-examples/features')
-rw-r--r--cli-examples/features/driver.cxx2
-rw-r--r--cli-examples/features/options.cli6
2 files changed, 4 insertions, 4 deletions
diff --git a/cli-examples/features/driver.cxx b/cli-examples/features/driver.cxx
index c14b5c7..a6299b9 100644
--- a/cli-examples/features/driver.cxx
+++ b/cli-examples/features/driver.cxx
@@ -45,7 +45,7 @@ main (int argc, char* argv[])
// --map | -m
//
- typedef map<std::string, std::string> str_map;
+ typedef map<std::string, bool> str_map;
const str_map& m = o.map ();
str_map::const_iterator i (m.find ("a"));
diff --git a/cli-examples/features/options.cli b/cli-examples/features/options.cli
index ea055b3..4065830 100644
--- a/cli-examples/features/options.cli
+++ b/cli-examples/features/options.cli
@@ -31,9 +31,9 @@ namespace features
std::set<int> --set | -s;
// We can also use maps. In this case the option value is expected to have
- // two parts: the key and the value, separated by '='. For example: -m a=A
- // -m =B -m c= -m d (same as -m d=).
+ // two parts: the key and the value, separated by '='. For example: -m a=1
+ // -m =true -m c= -m d (same as -m d=).
//
- std::map<std::string, std::string> --map | -m;
+ std::map<std::string, bool> --map | -m;
};
}