Skip to content

Commit ff79adb

Browse files
committed
remove unused templates from cpp-subprocess
The templates `is_ready`, `param_pack`, and `has_type` are not used anywhere, so let's remove them.
1 parent 2a07c46 commit ff79adb

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

src/util/subprocess.h

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,6 @@ class OSError: public std::runtime_error
159159
//--------------------------------------------------------------------
160160
namespace util
161161
{
162-
template <typename R>
163-
inline bool is_ready(std::shared_future<R> const &f)
164-
{
165-
return f.wait_for(std::chrono::seconds(0)) == std::future_status::ready;
166-
}
167-
168162
inline void quote_argument(const std::wstring &argument, std::wstring &command_line,
169163
bool force)
170164
{
@@ -724,35 +718,6 @@ class Popen;
724718
*/
725719

726720
namespace detail {
727-
728-
// Metaprogram for searching a type within
729-
// a variadic parameter pack
730-
// This is particularly required to do a compile time
731-
// checking of the arguments provided to 'check_output' function
732-
// wherein the user is not expected to provide an 'output' option.
733-
734-
template <typename... T> struct param_pack{};
735-
736-
template <typename F, typename T> struct has_type;
737-
738-
template <typename F>
739-
struct has_type<F, param_pack<>> {
740-
static constexpr bool value = false;
741-
};
742-
743-
template <typename F, typename... T>
744-
struct has_type<F, param_pack<F, T...>> {
745-
static constexpr bool value = true;
746-
};
747-
748-
template <typename F, typename H, typename... T>
749-
struct has_type<F, param_pack<H,T...>> {
750-
static constexpr bool value =
751-
std::is_same<F, typename std::decay<H>::type>::value ? true : has_type<F, param_pack<T...>>::value;
752-
};
753-
754-
//----
755-
756721
/*!
757722
* A helper class to Popen class for setting
758723
* options as provided in the Popen constructor

0 commit comments

Comments
 (0)