@@ -77,15 +77,6 @@ class GNetworkType<K, std::function<std::tuple<R...>(Args...)> >
77
77
78
78
using ResultL = std::tuple< cv::GArray<R>... >;
79
79
using APIList = std::function<ResultL(cv::GArray<cv::Rect>, Args...)>;
80
-
81
- // APIList2 is also template to allow different calling options
82
- // (GArray<cv::Rect> vs GArray<cv::GMat> per input)
83
- template <class ... Ts>
84
- using APIList2 = typename std::enable_if
85
- < cv::detail::valid_infer2_types< std::tuple<Args...>
86
- , std::tuple<Ts...> >::value,
87
- std::function<ResultL(cv::GMat, cv::GArray<Ts>...)>
88
- >::type;
89
80
};
90
81
91
82
// Single-return-value network definition (specialized base class)
@@ -101,14 +92,16 @@ class GNetworkType<K, std::function<R(Args...)> >
101
92
102
93
using ResultL = cv::GArray<R>;
103
94
using APIList = std::function<ResultL(cv::GArray<cv::Rect>, Args...)>;
95
+ };
104
96
105
- // APIList2 is also template to allow different calling options
106
- // (GArray<cv::Rect> vs GArray<cv::GMat> per input)
107
- template <class ... Ts>
108
- using APIList2 = typename std::enable_if
109
- < cv::detail::valid_infer2_types< std::tuple<Args...>
97
+ // APIList2 is also template to allow different calling options
98
+ // (GArray<cv::Rect> vs GArray<cv::GMat> per input)
99
+ template <class Net , class ... Ts>
100
+ struct InferAPIList2 {
101
+ using type = typename std::enable_if
102
+ < cv::detail::valid_infer2_types< typename Net::InArgs
110
103
, std::tuple<Ts...> >::value,
111
- std::function<ResultL(cv::GMat, cv::GArray<Ts>...)>
104
+ std::function<typename Net:: ResultL (cv::GMat, cv::GArray<Ts>...)>
112
105
>::type;
113
106
};
114
107
@@ -185,7 +178,7 @@ template<typename Net, typename... Args>
185
178
struct GInferList2 final
186
179
: public GInferList2Base
187
180
, public detail::KernelTypeMedium< GInferList2<Net, Args...>
188
- , typename Net:: template APIList2< Args...> > {
181
+ , typename InferAPIList2< Net, Args...>::type > {
189
182
using GInferList2Base::getOutMeta; // FIXME: name lookup conflict workaround?
190
183
191
184
static constexpr const char * tag () { return Net::tag (); }
0 commit comments