Fix overload for Executor ctor calls with brace-initializers
PiperOrigin-RevId: 354319778 Change-Id: I7b47ef2de734683f9168ef80f8b29357532d51ffpull/83/head
parent
ec870c3d15
commit
552a510777
|
@ -55,6 +55,9 @@ class Executor final {
|
|||
}
|
||||
|
||||
// As above, but with `const std::vector<std::string>&`
|
||||
// Templated to avoid ambiguity with the absl::Span overloads when called
|
||||
// with brace-initializers.
|
||||
template <typename = void>
|
||||
Executor(absl::string_view path, const std::vector<std::string>& argv,
|
||||
const std::vector<std::string>& envp = CopyEnviron())
|
||||
: Executor(path, absl::MakeSpan(argv), absl::MakeSpan(envp)) {}
|
||||
|
@ -71,6 +74,9 @@ class Executor final {
|
|||
}
|
||||
|
||||
// As above, but with `const std::vector<std::string>&`
|
||||
// Templated to avoid ambiguity with the absl::Span overloads when called
|
||||
// with brace-initializers.
|
||||
template <typename = void>
|
||||
Executor(int exec_fd, const std::vector<std::string>& argv,
|
||||
const std::vector<std::string>& envp)
|
||||
: Executor(exec_fd, absl::MakeSpan(argv), absl::MakeSpan(envp)) {}
|
||||
|
|
Loading…
Reference in New Issue