|
template <typename argvT, typename... lisT> |
|
Initializer(int argc, argvT **argv, lisT... args_append) |
|
{ |
|
// const and non const *argv[] are allowed. This assertion is |
|
// easier than duplicing the constructor. |
|
static_assert(std::is_same<const char, argvT>::value || std::is_same<char, argvT>::value, |
|
"argv must be of type const char or char"); |
|
std::vector<std::string> args; |
|
for (int i = 1; i < argc; i++) |
|
{ |
|
args.push_back(std::string(argv[i])); |
|
} |
|
toList(args, args_append...); |
|
initialize(args); |
|
} |
Arguments passed to etiss::Initializer(argc, argv) skip the first argument. I assume this was intended to filter out the argv[0], which usually is the executable. However, in case some user code passes arguments not directly from main(argc, argv), this results in possibly unexpected behavior.
etiss/include/etiss/ETISS.h
Lines 312 to 326 in 854394c
Arguments passed to
etiss::Initializer(argc, argv)skip the first argument. I assume this was intended to filter out theargv[0], which usually is the executable. However, in case some user code passes arguments not directly frommain(argc, argv), this results in possibly unexpected behavior.