From 95d48506833624e28fa68fdab5cfeeb98b05edff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Pecka?= Date: Sun, 15 May 2022 16:04:38 +0200 Subject: [PATCH] Add missing include MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After upgrading g++ package to 12.1.0 on archlinux I see the following compilation error: /usr/include/argparse/argparse.hpp: In member function ‘void argparse::ArgumentParser::index_argument(list_iterator)’: /usr/include/argparse/argparse.hpp:1167:34: error: ‘as_const’ is not a member of ‘std’; did you mean ‘is_const’? 1167 | for (const auto &name : std::as_const(it->m_names)) { | ^~~~~~~~ | is_const It turns out that std::as_const comes from header [1] which was not explicitly included. [1] https://en.cppreference.com/w/cpp/utility/as_const --- include/argparse/argparse.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/argparse/argparse.hpp b/include/argparse/argparse.hpp index 55828ed7..112534bf 100644 --- a/include/argparse/argparse.hpp +++ b/include/argparse/argparse.hpp @@ -48,6 +48,7 @@ SOFTWARE. #include #include #include +#include #include #include