{"id":487846,"date":"2026-07-20T08:11:33","date_gmt":"2026-07-20T08:11:33","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=487846"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=487846","title":{"rendered":"\u041e\u0447\u0435\u0440\u0435\u0434\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043d\u0430 C++. \u0412\u0441\u0442\u0440\u0435\u0447\u0430\u0439\u0442\u0435\u00a0FancyArgumentParser"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9de\/ac5\/c23\/9deac5c23a26080ee21008c78990117e.png\" width=\"1400\" height=\"769\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/9de\/ac5\/c23\/9deac5c23a26080ee21008c78990117e.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9de\/ac5\/c23\/9deac5c23a26080ee21008c78990117e.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h2>\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 (\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c)<\/h2>\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442!<\/p>\n<p>C++ \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044b\u043b \u043c\u043e\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u044f\u0437\u044b\u043a\u043e\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 C++11, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0442\u0430\u043b \u0432\u0430\u0436\u043d\u044b\u043c \u044d\u0442\u0430\u043f\u043e\u043c \u0432 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0438 \u044f\u0437\u044b\u043a\u0430. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u043d\u044b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u043d\u043e\u0432\u044b\u0445 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u0445, \u0432 C++ \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u043d\u0435 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443 \u043d\u0430\u0441 \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043d\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 \u0438\u043b\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u0431\u043e\u0440\u043a\u0438, \u043a\u0430\u043a \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041f\u043e\u043a\u0430 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u0431\u043e\u0440\u043a\u0438, \u0432 C++ \u043c\u044b \u043b\u0438\u0448\u0435\u043d\u044b \u0442\u0430\u043a\u043e\u0439 \u0440\u043e\u0441\u043a\u043e\u0448\u0438.<\/p>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0440\u0435\u0448\u0438\u0442\u044c, \u043d\u0443\u0436\u043d\u043e \u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043f\u0430\u043a\u0435\u0442\u043e\u0432: \u0447\u0438\u0441\u0442\u044b\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438, vcpkg \u0438\u043b\u0438 conan. \u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441\u0431\u043e\u0440\u043a\u0438: \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435, cmake, waf \u0438\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0435\u0449\u0451 \u0431\u043e\u043b\u0435\u0435 \u044d\u043a\u0437\u043e\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435. <\/p>\n<p>\u0412 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u0431\u043e\u0440\u043a\u0438, \u043f\u0440\u0438\u0446\u0435\u043f\u043e\u043c \u0438\u0434\u0451\u0442 \u043c\u0430\u043b\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a. \u041d\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u0441\u0435\u0442\u0435\u0439, \u0433\u0440\u0430\u0444\u0438\u043a\u0438. \u0414\u0430 \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0431\u044b\u0447\u043d\u044b\u0439 JSON \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438. <strong>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b<\/strong> \u0440\u0435\u0448\u0430\u0435\u043c\u044b\u0435, \u043d\u043e \u0442\u0430\u043c \u0446\u0435\u043b\u044b\u0439 \u0437\u043e\u043e\u043f\u0430\u0440\u043a \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 stl.<\/p>\n<p>\u0414\u043b\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a:\u00a0<a href=\"https:\/\/github.com\/CLIUtils\/CLI11\" rel=\"noopener noreferrer nofollow\">CLI11<\/a>,\u00a0<a href=\"https:\/\/github.com\/jarro2783\/cxxopts\" rel=\"noopener noreferrer nofollow\">cxxopts<\/a>,\u00a0<a href=\"https:\/\/github.com\/p-ranav\/argparse\" rel=\"noopener noreferrer nofollow\">argparse<\/a>\u00a0\u0438 \u0432\u0441\u0435\u043c\u043e\u0433\u0443\u0449\u0438\u0439\u00a0<a href=\"https:\/\/www.boost.org\/doc\/libs\/release\/doc\/html\/program_options.html\" rel=\"noopener noreferrer nofollow\">Boost.ProgramOptions<\/a>. \u041f\u043e\u0447\u0442\u0438 \u0443 \u0432\u0441\u0435\u0445 \u043d\u0438\u0445 \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u2014 &#171;\u043f\u0435\u0440\u0432\u043e\u0440\u043e\u0434\u043d\u044b\u0439 \u0433\u0440\u0435\u0445&#187; \u043c\u043d\u043e\u0433\u0438\u0445 C\/C++ \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a: \u043c\u0443\u0434\u0440\u0451\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c Boost, \u0432\u0441\u0435 \u043e\u043d\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f single-header \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043b\u0438\u043d\u043a\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0441 \u0447\u0435\u043c-\u043b\u0438\u0431\u043e \u0435\u0449\u0451, \u0445\u043e\u0442\u044c \u0433\u0434\u0435-\u0442\u043e \u043f\u043e\u0432\u0435\u0437\u043b\u043e.<\/p>\n<p>\u0418\u043c\u0435\u044f \u043e\u043f\u044b\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u00a0Python, \u0433\u0434\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043b\u0443\u0447\u0448\u0435, \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u0443\u044e Python-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439\u00a0<code>argparse<\/code>. \u042f \u0441\u0447\u0438\u0442\u0430\u044e, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u043c, \u043a\u0430\u043a \u043d\u0430\u0434\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u041d\u043e \u0443 \u043d\u0430\u0441, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u0442\u0430\u043a \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f &#8212; \u044f\u0437\u044b\u043a \u043f\u043e\u043a\u0430 \u0442\u0430\u043a \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c.<\/p>\n<p>\u041d\u043e \u044f \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0441\u044f \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u043b\u0438\u0436\u0435.<\/p>\n<h2>\u0412\u0441\u0442\u0440\u0435\u0447\u0430\u0439\u0442\u0435 Fancy Argument Parser<\/h2>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0435\u0451 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043e\u0440\u0446\u044b \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/github.com\/simfeo\/FancyArgumentParser\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0443 Github<\/a> \u0438\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u0447\u043a\u0443<\/p>\n<pre><code class=\"bash\">git clone https:\/\/github.com\/simfeo\/FancyArgumentParser# \u0438\u043b\u0438vcpkg install fancyargumentparser<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041b\u0438\u0446\u0435\u043d\u0437\u0438\u044f MIT \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/p>\n<h3>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438<\/h3>\n<ul>\n<li>\n<p><strong>Pure Single-Header:<\/strong>\u00a0\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 (<code>argparse.h<\/code>). \u041d\u0438\u043a\u0430\u043a\u0438\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u043b\u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a CMake.<\/p>\n<\/li>\n<li>\n<p><strong>Python-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 (C++20):<\/strong>\u00a0\u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 C++20, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b, \u0447\u0442\u043e \u0434\u0430\u0435\u0442 \u0447\u0438\u0441\u0442\u044b\u0439 \u0438 \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441.<\/p>\n<\/li>\n<li>\n<p><strong>\u0413\u0438\u0431\u043a\u0438\u0439 API:<\/strong>\u00a0\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0441\u0442\u0438\u043b\u044c: fluent interface (\u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432), \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0438\u043b\u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0441\u0442\u0438\u043b\u044c C++20.<\/p>\n<\/li>\n<li>\n<p><strong>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u044f:<\/strong>\u00a0\u041f\u0430\u0440\u0441\u0435\u0440 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043d\u044b\u0435 \u0444\u043b\u0430\u0433\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440,\u00a0<code>--verb<\/code>\u00a0\u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432\u00a0<code>--verbose<\/code>), \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b.<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432:<\/strong>\u00a0\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0441\u0442\u0440\u043e\u0433\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 (\u0442\u043e\u0447\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e, \u043e\u0442 \u043d\u0443\u043b\u044f \u0434\u043e \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438 \u0438 \u0442.\u0434.).<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 (Choices):<\/strong>\u00a0\u041c\u043e\u0436\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0444\u043b\u0430\u0433\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>\u0422\u0438\u043f\u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c:<\/strong>\u00a0\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0435\u0440\u0435\u0437\u00a0<code>GetAsInt()<\/code>,\u00a0<code>GetAsBool()<\/code>\u00a0\u0438 \u0442.\u0434.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a \u0436\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043e\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0444\u0438\u043b\u043e\u0441\u043e\u0444\u0438\u044e: \u0432\u044b\u043a\u0438\u043d\u0443\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 (\u0434\u043b\u044f \u0440\u0430\u043d\u043d\u0435\u0433\u043e \u043e\u0442\u043b\u043e\u0432\u0430 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439), \u043d\u0435 \u0432\u044b\u043a\u0438\u0434\u044b\u0432\u0430\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041d\u043e \u0445\u0432\u0430\u0442\u0438\u0442 \u0441\u043b\u043e\u0432.<\/p>\n<h3>\u0424\u0438\u0448\u043a\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/h3>\n<p>\u041c\u043e\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d \u0447\u0435\u0440\u0435\u0437 \u043c\u0430\u043a\u0440\u043e\u0441:<\/p>\n<pre><code class=\"cpp\">#define ARGPARSE_NAMESPACE_NAME cli#include \"argparse.h\"int main(int argc, char** argv){     auto parser = cli::ArgumentParser(\"greet\")                       .SetDescription(\"Custom namespace demo\");     ...<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 &#171;-&#187; \u0438 &#171;&#8212;&#187; \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0438\u043c\u0432\u043e\u043b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 &#171;*&#187;:<\/p>\n<pre><code class=\"cpp\">auto parser = argparse::ArgumentParser(\"sum\")                  .SetDescription(\"Sum any amount of numbers\")                  .SetPrefixChars('*'); \/\/\u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 :-)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0431\u0443\u043b\u0435\u0432\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u00a0<code>ArgTypeCast::e_bool<\/code>\u00a0f\u0434\u043b\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b <code>true<\/code>\/<code>True<\/code>\/<code>TRUE<\/code>\u00a0\u0438\u00a0<code>false<\/code>\/<code>False<\/code>\/<code>FALSE<\/code>.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0438 \u044d\u043f\u0438\u043b\u043e\u0433\u0430:<\/p>\n<pre><code class=\"cpp\">auto parser = argparse::ArgumentParser(\"server\")                  .SetDescription(\"Start a web server\")                  .SetUsage(\"serve --port PORT [--host HOST]\")                  .SetEpilogue(\"This is example of epilogue. Will be placed in the end of help\");<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430:<\/p>\n<pre><code class=\"cpp\">\/\/ \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u044b \u043c\u043d\u043e\u0433\u0438\u0435 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0438\/\/ \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0443 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\/\/ \u0441\u0430\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0444\u043e\u0440\u043c\u0430\u0442\u0430 std::stringparser.AddArgument(       argparse::CreateNamedArgument(\"o\", \"operation\")           .SetRequired(true)            .SetChoices({\"+\",\"-\",\"*\",\"\/\"}));<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0430\u0440\u0441\u0438\u043d\u0433, \u0434\u043b\u044f \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0431\u0443\u0434\u0435\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u044d\u0442\u043e \u043e\u0431\u043e\u0439\u0442\u0438 \u0444\u043b\u0430\u0433\u043e\u043c, \u0434\u043b\u044f \u0438\u0433\u043d\u043e\u0440\u0430 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<pre><code class=\"cpp\">auto parser = argparse::ArgumentParser(\"sum\")                   .SetDescription(\"Sum any amount of numbers\")                  .SetPrefixChars('+')                  .SetIgnoreUnknownArgs(true);<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/h2>\n<p>\u0425\u0432\u0430\u0442\u0438\u0442 \u0442\u0435\u043a\u0441\u0442\u0430, \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439. \u0414\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 <a href=\"https:\/\/github.com\/simfeo\/FancyArgumentParser\/wiki\/Examples\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0443 \u0432\u0438\u043a\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/a>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 C++20, \u0442\u043e \u0432\u0430\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0441\u0430\u043c\u044b\u0439 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430. \u041f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0445\u044d\u0434\u0435\u0440 \u043a\u0443\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c, \u0433\u0434\u0435 \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream&gt;#include \"argparse.h\"int main(int argc, char** argv) {    \/\/ \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432    auto parser = argparse::ArgumentParser(__FILE__)        .SetDescription(\"Description of program\");    \/\/ \u0418\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440    parser.AddArgument(argparse::CreateNamedArgument({        .longName = \"numbers\",        .nargs = argparse::kFromOneToInfiniteArgCount,        .type = argparse::ArgTypeCast::e_int    }));      \/\/ \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c    auto obj = parser.ParseArgs(argc, argv);        if (obj.IsArgValid() &amp;&amp; !obj.GetArg(\"help\").GetArgumentExists()) {        auto arg = obj.GetArg(\"numbers\");        for (auto&amp; el : arg.GetAsVecInt()) {            std::cout &lt;&lt; el &lt;&lt; std::endl;        }    } else {        std::cout &lt;&lt; parser.GetHelp(80) &lt;&lt; std::endl;    }    return 0;}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412\u044b\u0432\u043e\u0434 \u0434\u043b\u044f \u0444\u043b\u0430\u0433\u0430 &#8212;help:<\/p>\n<pre><code>main.cpp -n,--numbers [n ...] [-s,--some_boring_long_name [s ...]] [-h,--help]Description of programnamed arguments:-n,--numbers            Type: INT. Args count: at least one.-s,--some_boring_long_name                        some_boring_long_name description with some important information                        for user. Type: INT. Args count: at least one.-h,--help               Show help!<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: <\/strong>\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u0430\u043b\u0438\u0430\u0441, \u0434\u043b\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u0427\u0442\u043e \u0431\u044b \u044d\u0442\u043e \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c, \u0435\u0441\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u043f\u0446\u0438\u044f:<\/p>\n<pre><code class=\"cpp\">    auto parser = argparse::ArgumentParser(\"your program name\")        .SetDescription(\"Description of program\")        .SetAllowAbbrev(false);<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u0440\u044b\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442, \u0442\u043e \u0435\u0441\u0442\u044c 2 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u043e\u0442 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439 \u043a\u043e\u0434.<\/p>\n<p>\u0411\u043e\u043b\u0435\u0435 \u043a\u043e\u0440\u043e\u0442\u043a\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f, \u043d\u043e \u043c\u0435\u043d\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream&gt;#include \"argparse.h\"int main(int argc, char** argv){    auto parser = argparse::ArgumentParser(__FILE__).SetDescription(\"Description of program\");    parser.AddArgument(argparse::CreateNamedArgument(\"n\", \"numbers\",         argparse::kFromOneToInfiniteArgCount,        argparse::ArgTypeCast::e_int, false,        \"some numbers description with some important information for user.\"));    parser.AddArgument(argparse::CreateNamedArgument(\"s\", \"some_boring_long_name\",        argparse::kFromOneToInfiniteArgCount,        argparse::ArgTypeCast::e_int, false,        \"some_boring_long_name description with some important information for user.\"));    auto obj = parser.ParseArgs(argc, argv);    if (obj.IsArgValid() &amp;&amp; !obj.GetArg(\"help\").GetArgumentExists())    {        auto arg = obj.GetArg(\"numbers\");        if (arg.GetArgumentExists())        {            for (auto&amp; el : arg.GetAsVecInt())            {                std::cout &lt;&lt; el &lt;&lt; std::endl;            }        }    }    else    {        std::string help = parser.GetHelp(80);        std::cout &lt;&lt; obj.GetErrorString() &lt;&lt; std::endl;        std::cout &lt;&lt; help &lt;&lt; std::endl;    }    return 0;}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0418 \u043a\u0443\u0434\u0430 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u0430\u044f (\u0441\u0430\u043c\u043e\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f), \u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u043c\u043d\u043e\u0433\u043e\u0441\u043b\u043e\u0432\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream&gt;#include \"argparse.h\"int main(int argc, char** argv){    auto parser = argparse::ArgumentParser(\"Program name\")         .SetDescription(\"Description of program\");    parser.AddArgument(argparse::CreateNamedArgument()        .SetLongName(\"numbers\")        .SetAnyNumberOfArgumentsButAtLeastOne()        .SetType(argparse::ArgTypeCast::e_int));    parser.AddArgument(argparse::CreateNamedArgument()        .SetLongName(\"some_boring_long_name\")        .SetAnyNumberOfArgumentsButAtLeastOne()        .SetType(argparse::ArgTypeCast::e_int)        .SetHelp(\"some_boring_long_name description with some important information for user.\")        .SetRequired(false));    auto obj = parser.ParseArgs(argc, argv);        if (obj.IsArgValid() &amp;&amp; !obj.GetArg(\"help\").GetArgumentExists())    {        auto arg = obj.GetArg(\"numbers\");        if (arg.GetArgumentExists())        {            for (auto&amp; el : arg.GetAsVecInt())            {                std::cout &lt;&lt; el &lt;&lt; std::endl;            }        }    }    else    {        std::string help = parser.GetHelp(80);        std::cout &lt;&lt; obj.GetErrorString() &lt;&lt; std::endl;        std::cout &lt;&lt; help &lt;&lt; std::endl;    }    return 0;}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u042f\u043b\u0438\u0447\u043d\u043e \u0431\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0435\u043b \u0431\u043e\u043b\u0435\u0435 \u043c\u043d\u043e\u0433\u043e\u0441\u043b\u043e\u0432\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0430 \u043a\u0443\u0434\u0430 \u043f\u043e\u043d\u044f\u0442\u043d\u0435\u0435, \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0442\u044c \u0433\u0434\u0435 \u043a\u0430\u043a\u043e\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043d\u0430\u0434\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u0434\u043b\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430.<\/p>\n<p>\u0414\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440. \u0422\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442, \u0441 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0438\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream&gt;#include \"ArgParse\/argparse.h\"int main(int argc, char** argv){    auto parser = argparse::ArgumentParser(\"main\")      .SetDescription(\"ArgParse example\");    parser.AddArgument(argparse::CreateNamedArgument({         .shortName = \"bk\",         .longName  = \"b_key\",         .nargs     = 1,         .type      = argparse::ArgTypeCast::e_int,         .required  = true,         .help      = R\"=(some \"b_key\" description with some important information for user)=\"}));    parser.SetAddHelp(false);    auto obj = parser.ParseArgs(argc, argv);    if (obj.IsArgValid() &amp;&amp; !obj.GetArg(\"help\").GetArgumentExists())    {        auto arg = obj.GetArg(\"b_key\");        std::cout &lt;&lt; arg.Get().type().name() &lt;&lt; \": \" &lt;&lt; std::any_cast&lt;int&gt;(arg.Get()) &lt;&lt; std::endl;    }    else    {        std::string help = parser.GetHelp(80);        std::cout &lt;&lt; obj.GetErrorString() &lt;&lt; std::endl;        std::cout &lt;&lt; help &lt;&lt; std::endl;    }    return 0;}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0434\u0432\u0443\u0445 \u0442\u0438\u043f\u043e\u0432: \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0435. <strong>\u041f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u044b \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u0447\u043a\u0443, \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e. \u042d\u0442\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e.<\/strong> \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a \u044d\u0442\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream&gt;#include \"ArgParse\/argparse.h\"int main(int argc, char** argv){    auto parser = argparse::ArgumentParser(\"main\").SetDescription(\"ArgParse example\");    parser.AddArgument(argparse::CreatePositionalArgument({        .name     = \"int1\",        .type     = argparse::ArgTypeCast::e_int,        .required = false}));    \/\/ \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0432 \u0441\u0442\u0438\u043b\u0435 C++11    \/\/ parser.AddArgument(    \/\/          argparse::CreatePositionalArgument(\"int1\")    \/\/              .SetType(argparse::ArgTypeCast::e_int)    \/\/              .SetRequired(false));    auto obj = parser.ParseArgs(argc, argv);    if (obj.IsArgValid() &amp;&amp; !obj.GetArg(\"help\").GetArgumentExists())    {        auto arg = obj.GetArg(\"int1\");        if (arg.GetArgumentExists())        {            std::cout &lt;&lt; arg.Get().type().name() &lt;&lt; \": \" &lt;&lt; std::any_cast&lt;int&gt;(arg.Get()) &lt;&lt; std::endl;        }    }    else    {        std::string help = parser.GetHelp(80);        std::cout &lt;&lt; obj.GetErrorString() &lt;&lt; std::endl;        std::cout &lt;&lt; help &lt;&lt; std::endl;    }    return 0;}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>P.S.<\/p>\n<p>\u042f \u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0441 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0438 \u0434\u0440\u0443\u0436\u0435\u043b\u044e\u0431\u043d\u044b\u043c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u043e\u043c. \u041e\u043d\u0430 \u0433\u0438\u0431\u043a\u0430\u044f, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043d\u0430 \u043b\u0438\u0448\u043d\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043b\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.<\/p>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0435\u0439 MIT. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0435\u0451 \u043d\u0430\u00a0GitHub\u00a0\u043f\u043e\u0434 \u043d\u0438\u043a\u043e\u043c\u00a0<code>simfeo\/FancyArgumentParser<\/code>\u00a0\u0438\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437\u00a0<code>vcpkg<\/code>.<\/p>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1060714\/\">https:\/\/habr.com\/ru\/articles\/1060714\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 (\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c)\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442!C++ \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044b\u043b \u043c\u043e\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u044f\u0437\u044b\u043a\u043e\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 C++11, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0442\u0430\u043b \u0432\u0430\u0436\u043d\u044b\u043c \u044d\u0442\u0430\u043f\u043e\u043c \u0432 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0438 \u044f\u0437\u044b\u043a\u0430. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u043d\u044b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u043d\u043e\u0432\u044b\u0445 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u0445, \u0432 C++ \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u043d\u0435 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443 \u043d\u0430\u0441 \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043d\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 \u0438\u043b\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u0431\u043e\u0440\u043a\u0438, \u043a\u0430\u043a \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041f\u043e\u043a\u0430 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u0431\u043e\u0440\u043a\u0438, \u0432 C++ \u043c\u044b \u043b\u0438\u0448\u0435\u043d\u044b \u0442\u0430\u043a\u043e\u0439 \u0440\u043e\u0441\u043a\u043e\u0448\u0438.\u041a\u0430\u0436\u0434\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0440\u0435\u0448\u0438\u0442\u044c, \u043d\u0443\u0436\u043d\u043e \u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043f\u0430\u043a\u0435\u0442\u043e\u0432: \u0447\u0438\u0441\u0442\u044b\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438, vcpkg \u0438\u043b\u0438 conan. \u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441\u0431\u043e\u0440\u043a\u0438: \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435, cmake, waf \u0438\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0435\u0449\u0451 \u0431\u043e\u043b\u0435\u0435 \u044d\u043a\u0437\u043e\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435. \u0412 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u0431\u043e\u0440\u043a\u0438, \u043f\u0440\u0438\u0446\u0435\u043f\u043e\u043c \u0438\u0434\u0451\u0442 \u043c\u0430\u043b\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a. \u041d\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u0441\u0435\u0442\u0435\u0439, \u0433\u0440\u0430\u0444\u0438\u043a\u0438. \u0414\u0430 \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0431\u044b\u0447\u043d\u044b\u0439 JSON \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0440\u0435\u0448\u0430\u0435\u043c\u044b\u0435, \u043d\u043e \u0442\u0430\u043c \u0446\u0435\u043b\u044b\u0439 \u0437\u043e\u043e\u043f\u0430\u0440\u043a \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 stl.\u0414\u043b\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a:\u00a0CLI11,\u00a0cxxopts,\u00a0argparse\u00a0\u0438 \u0432\u0441\u0435\u043c\u043e\u0433\u0443\u0449\u0438\u0439\u00a0Boost.ProgramOptions. \u041f\u043e\u0447\u0442\u0438 \u0443 \u0432\u0441\u0435\u0445 \u043d\u0438\u0445 \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u2014 &#171;\u043f\u0435\u0440\u0432\u043e\u0440\u043e\u0434\u043d\u044b\u0439 \u0433\u0440\u0435\u0445&#187; \u043c\u043d\u043e\u0433\u0438\u0445 C\/C++ \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a: \u043c\u0443\u0434\u0440\u0451\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c Boost, \u0432\u0441\u0435 \u043e\u043d\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f single-header \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043b\u0438\u043d\u043a\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0441 \u0447\u0435\u043c-\u043b\u0438\u0431\u043e \u0435\u0449\u0451, \u0445\u043e\u0442\u044c \u0433\u0434\u0435-\u0442\u043e \u043f\u043e\u0432\u0435\u0437\u043b\u043e.\u0418\u043c\u0435\u044f \u043e\u043f\u044b\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u00a0Python, \u0433\u0434\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043b\u0443\u0447\u0448\u0435, \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u0443\u044e Python-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439\u00a0argparse. \u042f \u0441\u0447\u0438\u0442\u0430\u044e, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u043c, \u043a\u0430\u043a \u043d\u0430\u0434\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u041d\u043e \u0443 \u043d\u0430\u0441, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u0442\u0430\u043a \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f &#8212; \u044f\u0437\u044b\u043a \u043f\u043e\u043a\u0430 \u0442\u0430\u043a \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c.\u041d\u043e \u044f \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0441\u044f \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u043b\u0438\u0436\u0435.\u0412\u0441\u0442\u0440\u0435\u0447\u0430\u0439\u0442\u0435 Fancy Argument Parser\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0435\u0451 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043e\u0440\u0446\u044b \u0447\u0435\u0440\u0435\u0437 \u0441\u0441\u044b\u043b\u043a\u0443 Github \u0438\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u0447\u043a\u0443git clone https:\/\/github.com\/simfeo\/FancyArgumentParser# \u0438\u043b\u0438vcpkg install fancyargumentparser\u041b\u0438\u0446\u0435\u043d\u0437\u0438\u044f MIT \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438Pure Single-Header:\u00a0\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 (argparse.h). \u041d\u0438\u043a\u0430\u043a\u0438\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u043b\u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a CMake.Python-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 (C++20):\u00a0\u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 C++20, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b, \u0447\u0442\u043e \u0434\u0430\u0435\u0442 \u0447\u0438\u0441\u0442\u044b\u0439 \u0438 \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441.\u0413\u0438\u0431\u043a\u0438\u0439 API:\u00a0\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0441\u0442\u0438\u043b\u044c: fluent interface (\u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432), \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0438\u043b\u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0441\u0442\u0438\u043b\u044c C++20.\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u044f:\u00a0\u041f\u0430\u0440\u0441\u0435\u0440 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043d\u044b\u0435 \u0444\u043b\u0430\u0433\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440,\u00a0&#8212;verb\u00a0\u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432\u00a0&#8212;verbose), \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b.\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432:\u00a0\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0441\u0442\u0440\u043e\u0433\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 (\u0442\u043e\u0447\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e, \u043e\u0442 \u043d\u0443\u043b\u044f \u0434\u043e \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438 \u0438 \u0442.\u0434.).\u0412\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 (Choices):\u00a0\u041c\u043e\u0436\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0444\u043b\u0430\u0433\u0430.\u0422\u0438\u043f\u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c:\u00a0\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0435\u0440\u0435\u0437\u00a0GetAsInt(),\u00a0GetAsBool()\u00a0\u0438 \u0442.\u0434.\u0422\u0430\u043a \u0436\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043e\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0444\u0438\u043b\u043e\u0441\u043e\u0444\u0438\u044e: \u0432\u044b\u043a\u0438\u043d\u0443\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 (\u0434\u043b\u044f \u0440\u0430\u043d\u043d\u0435\u0433\u043e \u043e\u0442\u043b\u043e\u0432\u0430 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439), \u043d\u0435 \u0432\u044b\u043a\u0438\u0434\u044b\u0432\u0430\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041d\u043e \u0445\u0432\u0430\u0442\u0438\u0442 \u0441\u043b\u043e\u0432.\u0424\u0438\u0448\u043a\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438\u041c\u043e\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d \u0447\u0435\u0440\u0435\u0437 \u043c\u0430\u043a\u0440\u043e\u0441:#define ARGPARSE_NAMESPACE_NAME cli#include &#171;argparse.h&#187;int main(int argc, char** argv){     auto parser = cli::ArgumentParser(&#171;greet&#187;)                       .SetDescription(&#171;Custom namespace demo&#187;);     &#8230;\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 &#171;-&#187; \u0438 &#171;&#8212;&#187; \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0438\u043c\u0432\u043e\u043b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 &#171;*&#187;:auto parser = argparse::ArgumentParser(&#171;sum&#187;)                  .SetDescription(&#171;Sum any amount of numbers&#187;)                  .SetPrefixChars(&#8216;*&#8217;); \/\/\u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 :-)\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0431\u0443\u043b\u0435\u0432\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u00a0ArgTypeCast::e_bool\u00a0f\u0434\u043b\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b true\/True\/TRUE\u00a0\u0438\u00a0false\/False\/FALSE.\u041c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0438 \u044d\u043f\u0438\u043b\u043e\u0433\u0430:auto parser = argparse::ArgumentParser(&#171;server&#187;)                  .SetDescription(&#171;Start a web server&#187;)                  .SetUsage(&#171;serve &#8212;port PORT [&#8212;host HOST]&#187;)                  .SetEpilogue(&#171;This is example of epilogue. Will be placed in the end of help&#187;);\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430:\/\/ \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u044b \u043c\u043d\u043e\u0433\u0438\u0435 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0438\/\/ \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0443 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\/\/ \u0441\u0430\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0444\u043e\u0440\u043c\u0430\u0442\u0430 std::stringparser.AddArgument(       argparse::CreateNamedArgument(&#171;o&#187;, &#171;operation&#187;)           .SetRequired(true)            .SetChoices({&#171;+&#187;,&#187;-&#171;,&#187;*&#187;,&#187;\/&#187;}));\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0430\u0440\u0441\u0438\u043d\u0433, \u0434\u043b\u044f \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0431\u0443\u0434\u0435\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u044d\u0442\u043e \u043e\u0431\u043e\u0439\u0442\u0438 \u0444\u043b\u0430\u0433\u043e\u043c, \u0434\u043b\u044f \u0438\u0433\u043d\u043e\u0440\u0430 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432:auto parser = argparse::ArgumentParser(&#171;sum&#187;)                   .SetDescription(&#171;Sum any amount of numbers&#187;)                  .SetPrefixChars(&#8216;+&#8217;)                  .SetIgnoreUnknownArgs(true);\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f\u0425\u0432\u0430\u0442\u0438\u0442 \u0442\u0435\u043a\u0441\u0442\u0430, \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439. \u0414\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0443 \u0432\u0438\u043a\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.\u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 C++20, \u0442\u043e \u0432\u0430\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0441\u0430\u043c\u044b\u0439 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430. \u041f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0445\u044d\u0434\u0435\u0440 \u043a\u0443\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c, \u0433\u0434\u0435 \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d:#include &lt;iostream&gt;#include &#171;argparse.h&#187;int main(int argc, char** argv) {    \/\/ \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432    auto parser = argparse::ArgumentParser(__FILE__)        .SetDescription(&#171;Description of program&#187;);    \/\/ \u0418\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440    parser.AddArgument(argparse::CreateNamedArgument({        .longName = &#171;numbers&#187;,        .nargs = argparse::kFromOneToInfiniteArgCount,        .type = argparse::ArgTypeCast::e_int    }));      \/\/ \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c    auto obj = parser.ParseArgs(argc, argv);        if (obj.IsArgValid() &amp;&amp; !obj.GetArg(&#171;help&#187;).GetArgumentExists()) {        auto arg = obj.GetArg(&#171;numbers&#187;);        for (auto&amp; el : arg.GetAsVecInt()) {            std::cout &lt;&lt; el &lt;&lt; std::endl;        }    } else {        std::cout &lt;&lt; parser.GetHelp(80) &lt;&lt; std::endl;    }    return 0;}\u0412\u044b\u0432\u043e\u0434 \u0434\u043b\u044f \u0444\u043b\u0430\u0433\u0430 &#8212;help:main.cpp -n,&#8212;numbers [n &#8230;] [-s,&#8212;some_boring_long_name [s &#8230;]] [-h,&#8212;help]Description of programnamed arguments:-n,&#8212;numbers            Type: INT. Args count: at least one.-s,&#8212;some_boring_long_name                        some_boring_long_name description with some important information                        for user. Type: INT. Args count: at least one.-h,&#8212;help               Show help!\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u0430\u043b\u0438\u0430\u0441, \u0434\u043b\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u0427\u0442\u043e \u0431\u044b \u044d\u0442\u043e \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c, \u0435\u0441\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u043f\u0446\u0438\u044f:    auto parser = argparse::ArgumentParser(&#171;your program name&#187;)        .SetDescription(&#171;Description of program&#187;)        .SetAllowAbbrev(false);\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u0440\u044b\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442, \u0442\u043e \u0435\u0441\u0442\u044c 2 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u043e\u0442 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439 \u043a\u043e\u0434.\u0411\u043e\u043b\u0435\u0435 \u043a\u043e\u0440\u043e\u0442\u043a\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f, \u043d\u043e \u043c\u0435\u043d\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f:#include &lt;iostream&gt;#include &#171;argparse.h&#187;int main(int argc, char** argv){    auto parser = argparse::ArgumentParser(__FILE__).SetDescription(&#171;Description of program&#187;);    parser.AddArgument(argparse::CreateNamedArgument(&#171;n&#187;, &#171;numbers&#187;,         argparse::kFromOneToInfiniteArgCount,        argparse::ArgTypeCast::e_int, false,        &#171;some numbers description with some important information for user.&#187;));    parser.AddArgument(argparse::CreateNamedArgument(&#171;s&#187;, &#171;some_boring_long_name&#187;,        argparse::kFromOneToInfiniteArgCount,        argparse::ArgTypeCast::e_int, false,        &#171;some_boring_long_name description with some important information for user.&#187;));    auto obj = parser.ParseArgs(argc, argv);    if (obj.IsArgValid() &amp;&amp; !obj.GetArg(&#171;help&#187;).GetArgumentExists())    {        auto arg = obj.GetArg(&#171;numbers&#187;);        if (arg.GetArgumentExists())        {            for (auto&amp; el : arg.GetAsVecInt())            {                std::cout &lt;&lt; el &lt;&lt; std::endl;            }        }    }    else    {        std::string help = parser.GetHelp(80);        std::cout &lt;&lt; obj.GetErrorString() &lt;&lt; std::endl;        std::cout &lt;&lt; help &lt;&lt; std::endl;    }    return 0;}\u0418 \u043a\u0443\u0434\u0430 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u0430\u044f (\u0441\u0430\u043c\u043e\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f), \u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u043c\u043d\u043e\u0433\u043e\u0441\u043b\u043e\u0432\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f:#include &lt;iostream&gt;#include &#171;argparse.h&#187;int main(int argc, char** argv){    auto parser = argparse::ArgumentParser(&#171;Program name&#187;)         .SetDescription(&#171;Description of program&#187;);    parser.AddArgument(argparse::CreateNamedArgument()        .SetLongName(&#171;numbers&#187;)        .SetAnyNumberOfArgumentsButAtLeastOne()        .SetType(argparse::ArgTypeCast::e_int));    parser.AddArgument(argparse::CreateNamedArgument()        .SetLongName(&#171;some_boring_long_name&#187;)        .SetAnyNumberOfArgumentsButAtLeastOne()        .SetType(argparse::ArgTypeCast::e_int)        .SetHelp(&#171;some_boring_long_name description with some important information for user.&#187;)        .SetRequired(false));    auto obj = parser.ParseArgs(argc, argv);        if (obj.IsArgValid() &amp;&amp; !obj.GetArg(&#171;help&#187;).GetArgumentExists())    {        auto arg = obj.GetArg(&#171;numbers&#187;);        if (arg.GetArgumentExists())        {            for (auto&amp; el : arg.GetAsVecInt())            {                std::cout &lt;&lt; el &lt;&lt; std::endl;            }        }    }    else    {        std::string help = parser.GetHelp(80);        std::cout &lt;&lt; obj.GetErrorString() &lt;&lt; std::endl;        std::cout &lt;&lt; help &lt;&lt; std::endl;    }    return 0;}\u042f\u043b\u0438\u0447\u043d\u043e \u0431\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0435\u043b \u0431\u043e\u043b\u0435\u0435 \u043c\u043d\u043e\u0433\u043e\u0441\u043b\u043e\u0432\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0430 \u043a\u0443\u0434\u0430 \u043f\u043e\u043d\u044f\u0442\u043d\u0435\u0435, \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0442\u044c \u0433\u0434\u0435 \u043a\u0430\u043a\u043e\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043d\u0430\u0434\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u0434\u043b\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430.\u0414\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440. \u0422\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442, \u0441 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0438\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432:#include &lt;iostream&gt;#include &#171;ArgParse\/argparse.h&#187;int main(int argc, char** argv){    auto parser = argparse::ArgumentParser(&#171;main&#187;)      .SetDescription(&#171;ArgParse example&#187;);    parser.AddArgument(argparse::CreateNamedArgument({         .shortName = &#171;bk&#187;,         .longName  = &#171;b_key&#187;,         .nargs     = 1,         .type      =&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-487846","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/487846","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=487846"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/487846\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=487846"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=487846"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=487846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}