aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaylor C. Richberger <taywee@gmx.com>2018-09-24 09:21:12 -0600
committerGitHub <noreply@github.com>2018-09-24 09:21:12 -0600
commit24868affc8f7f88ce8781bc6a21c5c7d5067c508 (patch)
treea7b759ec9a1a3b456e74df850fbf1bb65cddf70a
parentMerge pull request #64 from milipili/optional-cmake-tests (diff)
parentFix error: catching polymorphic type by value (diff)
downloadargs.hxx-24868affc8f7f88ce8781bc6a21c5c7d5067c508.tar.xz
Merge pull request #65 from Rholais/patch-1
Fix error: catching polymorphic type by value
-rw-r--r--README.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/README.md b/README.md
index 5327549..881179f 100644
--- a/README.md
+++ b/README.md
@@ -185,17 +185,17 @@ int main(int argc, char **argv)
{
parser.ParseCLI(argc, argv);
}
- catch (args::Completion e)
+ catch (const args::Completion& e)
{
std::cout << e.what();
return 0;
}
- catch (args::Help)
+ catch (const args::Help&)
{
std::cout << parser;
return 0;
}
- catch (args::ParseError e)
+ catch (const args::ParseError& e)
{
std::cerr << e.what() << std::endl;
std::cerr << parser;