Program Options - options dependencies
2 Jul
2014
2 Jul
'14
8:11 p.m.
Dear all, I am using the Program Options and I would like to know if I can add options dependencies through the lib. For example, consider a "test" program that has a flag "--has-dependencies" that needs a flag "--dependency" and a flag "--no-depenencies". It would run like this: $./test --no-dependencies Program running... $./test --has-dependencies Error! Flag "--dependency" is needed! $./test --has-dependencies --dependency Program running... PS: I know I can use something like this, but I would like to know if there is a better option: if ( vm.count("--has-dependencies") ) if ( vm.count("--dependency") ) //do something... else //trow an error
3801
Age (days ago)
3801
Last active (days ago)
0 comments
1 participants
participants (1)
-
Angelo Mondaini