aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorRholais Lii <rholais@gmail.com>2018-09-23 20:35:31 -0500
committerGitHub <noreply@github.com>2018-09-23 20:35:31 -0500
commit95e7d98101469a185e0d92551c89e869d6efaeae (patch)
treea7b759ec9a1a3b456e74df850fbf1bb65cddf70a /README.md
parentMerge pull request #64 from milipili/optional-cmake-tests (diff)
downloadargs.hxx-95e7d98101469a185e0d92551c89e869d6efaeae.tar.xz
Fix error: catching polymorphic type by value
Diffstat (limited to 'README.md')
-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;