Behavior of CommandLineParser::has()

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

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 close merge delete

Comments

2

this is a known issue

boaz001 gravatar imageboaz001 ( 2015-04-17 08:34:16 -0500 )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 -0500 )edit
1
juanmanpr gravatar imagejuanmanpr ( 2015-04-17 11:18:57 -0500 )edit