-// Copyright (C) 2020-2023 Joel Rosdahl and other contributors
+// Copyright (C) 2020-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
m_args.erase(m_args.begin(), m_args.begin() + count);
}
-void
-Args::push_back(const std::string& arg)
-{
- m_args.push_back(arg);
-}
-
void
Args::push_back(const Args& args)
{
-// Copyright (C) 2020-2022 Joel Rosdahl and other contributors
+// Copyright (C) 2020-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
// Add `arg` to the end.
void push_back(const std::string& arg);
+ void push_back(std::string&& arg);
// Add `args` to the end.
void push_back(const Args& args);
{
return m_args[i];
}
+
+inline void
+Args::push_back(const std::string& arg)
+{
+ m_args.push_back(arg);
+}
+
+inline void
+Args::push_back(std::string&& arg)
+{
+ m_args.push_back(arg);
+}