From 4b413d34f48d752dd5f8f1947ebe1a4d51ac00fd Mon Sep 17 00:00:00 2001 From: Klemens Morgenstern Date: Tue, 13 Jun 2023 22:03:05 +0800 Subject: [PATCH] Remove initializer_list constructors. They are causing ambiguity and are not that useful. Closes #313 --- include/boost/process/v2/popen.hpp | 36 ---------------------------- include/boost/process/v2/process.hpp | 12 +--------- 2 files changed, 1 insertion(+), 47 deletions(-) diff --git a/include/boost/process/v2/popen.hpp b/include/boost/process/v2/popen.hpp index c1ca5805..7696eb71 100644 --- a/include/boost/process/v2/popen.hpp +++ b/include/boost/process/v2/popen.hpp @@ -109,42 +109,6 @@ struct basic_popen : basic_process )); } - /// Construct a child from a property list and launch it using the default process launcher. - template - explicit basic_popen( - executor_type executor, - const filesystem::path& exe, - std::initializer_list args, - Inits&&... inits) - : basic_process(executor) - { - this->basic_process::operator=( - default_process_launcher()( - this->get_executor(), exe, args, - std::forward(inits)..., - process_stdio{stdin_, stdout_} - )); - } - - - /// Construct a child from a property list and launch it using the default process launcher. - template - explicit basic_popen( - Launcher && launcher, - executor_type executor, - const filesystem::path& exe, - std::initializer_list args, - Inits&&... inits) - : basic_process(executor) - { - this->basic_process::operator=( - std::forward(launcher)( - this->get_executor(), exe, args, - std::forward(inits)..., - process_stdio{stdin_, stdout_} - )); - } - /// Construct a child from a property list and launch it using the default process launcher. template explicit basic_popen( diff --git a/include/boost/process/v2/process.hpp b/include/boost/process/v2/process.hpp index 75d04688..eae505e5 100644 --- a/include/boost/process/v2/process.hpp +++ b/include/boost/process/v2/process.hpp @@ -93,17 +93,7 @@ struct basic_process : basic_process(default_process_launcher()(std::move(executor), exe, args, std::forward(inits)...)) { } - /// Construct a child from a property list and launch it using the default launcher.. - template - explicit basic_process( - executor_type executor, - const filesystem::path& exe, - std::initializer_list args, - Inits&&... inits) - : basic_process(default_process_launcher()(std::move(executor), exe, args, std::forward(inits)...)) - { - } - + /// Construct a child from a property list and launch it using the default launcher.. template explicit basic_process(