diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cafff1..01b67b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,10 @@ options. The project adheres to semantic versioning. * Fixed an ambiguous overload in the `parse_positional` function when an `initializer_list` was directly passed. +### Bug Fixes + +* Building against GCC 4.9 was broken due to overly strict shadow warnings. + ## 2.0 ### Changed diff --git a/include/cxxopts.hpp b/include/cxxopts.hpp index f0ecec1..49ade40 100644 --- a/include/cxxopts.hpp +++ b/include/cxxopts.hpp @@ -902,13 +902,13 @@ namespace cxxopts public: OptionDetails ( - const std::string& short_name, - const std::string& long_name, + const std::string& short_, + const std::string& long_, const String& desc, std::shared_ptr val ) - : m_short(short_name) - , m_long(long_name) + : m_short(short_) + , m_long(long_) , m_desc(desc) , m_value(val) , m_count(0) @@ -1038,9 +1038,9 @@ namespace cxxopts class KeyValue { public: - KeyValue(std::string key, std::string value) - : m_key(std::move(key)) - , m_value(std::move(value)) + KeyValue(std::string key_, std::string value_) + : m_key(std::move(key_)) + , m_value(std::move(value_)) { }