Subject: [Boost-bugs] [Boost C++ Libraries] #5329: Example program first.cpp returns code 1 in case when program called with "--help" option
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-03-17 21:07:36
#5329: Example program first.cpp returns code 1 in case when program called with "
--help" option
--------------------------------------------------+-------------------------
Reporter: Vladimir Rutsky <altsysrq@â¦> | Owner: vladimir_prus
Type: Bugs | Status: new
Milestone: To Be Determined | Component: program_options
Version: Boost Development Trunk | Severity: Cosmetic
Keywords: return |
--------------------------------------------------+-------------------------
Hello,
first.cpp example at trunk/libs/program_options/example/first.cpp contains
following code at line 30 (r70076):
{{{
if (vm.count("help")) {
cout << desc << "\n";
return 1;
}
}}}
That means that program will return non-zero code when called as
"./program --help", which usually mean incorrect program termination.
I think outputting help message is a correct program behavior and there
should be returned zero code: "return 0".
Best regards,
Vladimir Rutsky
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5329> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:05 UTC