Skip to content

Commit

Permalink
Fix regression in version printing.
Browse files Browse the repository at this point in the history
This regression was caused by commit
ea1f7ef, which didn't add "\n" to the
version printing statement. We use std::endl now for compatibility
across platforms.
  • Loading branch information
ericonr committed Apr 13, 2022
1 parent 1a552df commit 3b89546
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/argparse/argparse.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ class ArgumentParser {
if ((add_args & default_arguments::version) == default_arguments::version) {
add_argument("-v", "--version")
.action([&](const auto &unused) {
std::cout << m_version;
std::cout << m_version << std::endl;
std::exit(0);
})
.default_value(false)
Expand Down

0 comments on commit 3b89546

Please sign in to comment.