From 9bbd58c6ad6e9522e9caf11299049981f0298cc7 Mon Sep 17 00:00:00 2001 From: Pranav Srinivas Kumar Date: Fri, 8 May 2020 14:27:20 -0500 Subject: [PATCH] Closes #76 --- include/argparse.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/argparse.hpp b/include/argparse.hpp index 701cd0a..d4c3e48 100644 --- a/include/argparse.hpp +++ b/include/argparse.hpp @@ -859,7 +859,7 @@ public: * Used in conjuction with Argument.operator== e.g., parser["foo"] == true * @throws std::logic_error in case of an invalid argument name */ - Argument &operator[](std::string_view aArgumentName) { + Argument &operator[](std::string_view aArgumentName) const { auto tIterator = mArgumentMap.find(aArgumentName); if (tIterator != mArgumentMap.end()) { return *(tIterator->second);