cxxopts icon indicating copy to clipboard operation
cxxopts copied to clipboard

Lightweight C++ command line option parser

Results 96 cxxopts issues
Sort by recently updated
recently updated
newest added

openFPGALoader uses cxxopts for argument parsing. To dump the content from some flash chip, a size argument must be given. At resent I must use "--file-size 1000000" to read 1MByte,...

After skimming through #73 #44 and #35, where the main issues from the devs seems to be this one > The main reasoning is that usually options are not just...

Hello, I want to make a one dash as an argument (like `gcc -` for consuming stdin), but can't find anything about this, while I tried to create a simple...

Hi, I'd like an option to input two values for a parameter and take them as an input. This would differ from `std::vector` values in that the number of values...

# Current Behavior ```cpp cxxopts::Options o{"", ""}; o.add_options()("a", "", cxxopts::value()); o.parse_positional({"a"}); std::vector arg = {"a.out"}; auto r = o.parse(arg.size(), arg.data()); EXPECT_ANY_THROW(r["a"].as()); ``` # Expected Behavior ```cpp cxxopts::Options o{"", ""}; o.add_options()("a",...

```c++ cxxopts::Options opts("ai-server", "ai server"); opts.add_options("general") ("h,help", "Print usage", cxxopts::value()->implicit_value("")) ("groups", "Print all groups") ("print", "Print configure values of special group. Empty group means all group.", cxxopts::value()->implicit_value("")); opts.add_options("cfgo") ("s,signal_url", "The...

Although not a standard way and rarely seen, but some tools (Verilog simulators, UVM, ...) use + to indicate custom arguments. Examples are: ```sh +TEST=AXI_TEST +UVM_TESTNAME=read_modify_write_test +UVM_MAX_QUIT_COUNT=5,NO +UVM_TIMEOUT=200000,NO +UVM_PHASE_TRACE ```...

Does the library support sub-options like python's argparse module?

``` In file included from /Users/eijkhout/Installation/cxxopts/cxxopts-3.2.0/test/catch.hpp:72, from /Users/eijkhout/Installation/cxxopts/cxxopts-3.2.0/test/main.cpp:2: /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/TargetConditionals.h:140:50: error: missing binary operator before token "(" 140 | #if !defined(__has_extension) || !__has_extension(define_target_os_macros) | ^ ``` I'm seeing more tickets about...

For C++17 it would be a good option to use std::variant and not depend on RTTI