13 #ifndef __STOUT_OS_RAW_ARGV_HPP__ 14 #define __STOUT_OS_RAW_ARGV_HPP__ 42 template <
typename Iterable>
43 explicit Argv(
const Iterable& iterable)
45 foreach (
const std::string& arg, iterable) {
46 args.emplace_back(arg);
49 argv =
new char*[args.size() + 1];
50 for (
size_t i = 0; i < args.size(); i++) {
51 argv[i] =
const_cast<char*
>(args[i].c_str());
54 argv[args.size()] =
nullptr;
62 operator char**()
const 67 operator std::vector<std::string>()
const 73 std::vector<std::string> args;
82 #endif // __STOUT_OS_RAW_ARGV_HPP__ Argv(const Iterable &iterable)
Definition: argv.hpp:43
Definition: posix_signalhandler.hpp:23
Represent the argument list expected by execv routines.
Definition: argv.hpp:36
Argv(const Argv &)=delete
Argv & operator=(const Argv &)=delete
~Argv()
Definition: argv.hpp:57