diff --git a/modules/gapi/include/opencv2/gapi/infer.hpp b/modules/gapi/include/opencv2/gapi/infer.hpp index d108ca136c..50086dd848 100644 --- a/modules/gapi/include/opencv2/gapi/infer.hpp +++ b/modules/gapi/include/opencv2/gapi/infer.hpp @@ -77,15 +77,6 @@ public: using ResultL = std::tuple< cv::GArray... >; using APIList = std::function, Args...)>; - - // APIList2 is also template to allow different calling options - // (GArray vs GArray per input) - template - using APIList2 = typename std::enable_if - < cv::detail::valid_infer2_types< std::tuple - , std::tuple >::value, - std::function...)> - >::type; }; // Single-return-value network definition (specialized base class) @@ -101,14 +92,16 @@ public: using ResultL = cv::GArray; using APIList = std::function, Args...)>; +}; - // APIList2 is also template to allow different calling options - // (GArray vs GArray per input) - template - using APIList2 = typename std::enable_if - < cv::detail::valid_infer2_types< std::tuple +// APIList2 is also template to allow different calling options +// (GArray vs GArray per input) +template +struct InferAPIList2 { + using type = typename std::enable_if + < cv::detail::valid_infer2_types< typename Net::InArgs , std::tuple >::value, - std::function...)> + std::function...)> >::type; }; @@ -185,7 +178,7 @@ template struct GInferList2 final : public GInferList2Base , public detail::KernelTypeMedium< GInferList2 - , typename Net::template APIList2 > { + , typename InferAPIList2::type > { using GInferList2Base::getOutMeta; // FIXME: name lookup conflict workaround? static constexpr const char* tag() { return Net::tag(); }