aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/aesxx/utils/helpers/cmd_parser.hpp
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-07-22 21:32:59 +0200
committerEgor Tensin <egor@tensin.name>2026-07-22 21:32:59 +0200
commitff93a0a580416f73bc86c7a12c5637819ca146e6 (patch)
tree071c758a6b7f883be32d57900395231781a8abb5 /aesxx/utils/helpers/cmd_parser.hpp
parentrewrite: the beginning (diff)
downloadaes-tools-ff93a0a580416f73bc86c7a12c5637819ca146e6.tar.gz
aes-tools-ff93a0a580416f73bc86c7a12c5637819ca146e6.zip
rewrite: sort out and modernize Boost.Program_Options usage
Diffstat (limited to 'aesxx/utils/helpers/cmd_parser.hpp')
-rw-r--r--aesxx/utils/helpers/cmd_parser.hpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/aesxx/utils/helpers/cmd_parser.hpp b/aesxx/utils/helpers/cmd_parser.hpp
index 11146e8..cc8d00c 100644
--- a/aesxx/utils/helpers/cmd_parser.hpp
+++ b/aesxx/utils/helpers/cmd_parser.hpp
@@ -28,20 +28,17 @@ public:
}
virtual void parse(int argc, char* argv[]) {
- boost::program_options::options_description all;
+ namespace po = boost::program_options;
+ po::options_description all;
all.add(hidden).add(visible);
- boost::program_options::variables_map vm;
- boost::program_options::store(
- boost::program_options::command_line_parser{argc, argv}
- .options(all)
- .positional(positional)
- .run(),
- vm
+ po::variables_map vm;
+ po::store(
+ po::command_line_parser{argc, argv}.options(all).positional(positional).run(), vm
);
if (vm.count("help"))
_exit_with_usage = true;
else
- boost::program_options::notify(vm);
+ po::notify(vm);
}
bool exit_with_usage() const {