Behavior of CommandLineParser::has() [closed]

asked 2015-04-17 07:43:20 -0600

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.

edit retag flag offensive reopen merge delete

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 ( 2015-04-17 08:34:16 -0600 )edit
1

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

krips89 gravatar imagekrips89 ( 2015-04-17 10:16:27 -0600 )edit
1
juanmanpr gravatar imagejuanmanpr ( 2015-04-17 11:18:57 -0600 )edit