diff --git a/modules/gapi/include/opencv2/gapi/infer.hpp b/modules/gapi/include/opencv2/gapi/infer.hpp index b850775a62..f20f638017 100644 --- a/modules/gapi/include/opencv2/gapi/infer.hpp +++ b/modules/gapi/include/opencv2/gapi/infer.hpp @@ -418,8 +418,8 @@ struct GAPI_EXPORTS GNetParam { * @sa cv::gapi::networks */ struct GAPI_EXPORTS_W_SIMPLE GNetPackage { - GAPI_WRAP GNetPackage() : GNetPackage({}) {} - explicit GNetPackage(std::initializer_list &&ii); + GAPI_WRAP GNetPackage() = default; + explicit GNetPackage(std::initializer_list ii); std::vector backends() const; std::vector networks; }; diff --git a/modules/gapi/src/api/ginfer.cpp b/modules/gapi/src/api/ginfer.cpp index 156f8938c4..f4bd1c3abb 100644 --- a/modules/gapi/src/api/ginfer.cpp +++ b/modules/gapi/src/api/ginfer.cpp @@ -16,8 +16,8 @@ #include -cv::gapi::GNetPackage::GNetPackage(std::initializer_list &&ii) - : networks(std::move(ii)) { +cv::gapi::GNetPackage::GNetPackage(std::initializer_list ii) + : networks(ii) { } std::vector cv::gapi::GNetPackage::backends() const {