Behavior of CommandLineParser::has() [closed]

asked Apr 17 '15

krips89 gravatar image

I suppose CommandLineParser::has("something") should be true when the command line has --something in it? The following code shows some contradictory behavior.

cout << "yo " << parser.get<int>("cam_id") << endl;
cout << "ya " << parser.has("cam_id") << endl;

When run with the input --cam_id=22 gives the following output:

yo 22
ya 0

I was expecting it to be ya 1as well. How would I detect if the input has has a certain parameter.

Preview: (hide)

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-10-01 11:03:05.809791

Comments

2

this is a known issue

boaz001 gravatar imageboaz001 (Apr 17 '15)edit
1

ah, known issue again. Should be a simple fix; how much time does it take to fix that?

krips89 gravatar imagekrips89 (Apr 17 '15)edit
1
juanmanpr gravatar imagejuanmanpr (Apr 17 '15)edit