diff --git a/include/argparse/argparse.hpp b/include/argparse/argparse.hpp index 1d4938b..bf8de35 100644 --- a/include/argparse/argparse.hpp +++ b/include/argparse/argparse.hpp @@ -46,7 +46,6 @@ SOFTWARE. #include #include #include -#include #include #include #include @@ -1429,7 +1428,7 @@ public: // argument_it = other.m_argument_map.find("name") auto first_name = arg->m_names[0]; auto it = m_argument_map.find(first_name); - group.m_elements.insert(&(*it->second)); + group.m_elements.push_back(&(*it->second)); } m_mutually_exclusive_groups.push_back(std::move(group)); } @@ -1492,14 +1491,14 @@ public: template Argument &add_argument(Targs... f_args) { auto &argument = m_parent.add_argument(std::forward(f_args)...); - m_elements.insert(&argument); + m_elements.push_back(&argument); return argument; } private: ArgumentParser &m_parent; bool m_required{false}; - std::set m_elements{}; + std::vector m_elements{}; }; MutuallyExclusiveGroup &add_mutually_exclusive_group(bool required = false) {