Conversation
|
@TolyaTalamanov, @AsyaPronina, @anton-potapov. Any feedback is appreciated |
|
Adding GOpaque to variant broke the ABI |
Unfortunately there is no reliable way to maintain ABI checker for G-API anymore. |
|
@rgarnov, @AsyaPronina, @TolyaTalamanov, please, review. As discussed with @dmatveev, 'copypaste' of GArray is OK for now, so it can be reviewed and merged. |
@alalek I thought ABI compatibility requirements were relaxed already since 4.0? |
|
We use "ABI checker" tool in "source" compatibility mode for OpenCV 4.x. OpenCV 3.4 uses full binary/source checks. |
|
This thing just can't into template changes :) I believe source compatibility is actually preserved here. |
|
There is some issue with ARMv7 builder (GCC 4.8). |
| OpaqueRef() = default; | ||
| template<typename T> explicit OpaqueRef(const T& obj) : m_ref(new OpaqueRefT<T>(obj)) {} | ||
| template<typename T> explicit OpaqueRef( T& obj) : m_ref(new OpaqueRefT<T>(obj)) {} | ||
| template<typename T> explicit OpaqueRef( T&& obj) : m_ref(new OpaqueRefT<T>(obj)) {} |
There was a problem hiding this comment.
Removal of T&& case + adding specialization for WrapValue<cv::detail::OpaqueRef> helps with compilation on GCC 4.8
There was a problem hiding this comment.
removal of
T&&
You may try std::remove_reference instead:
template<typename T> explicit OpaqueRef(const typename std::remove_reference<T>::type& obj) : m_ref(new OpaqueRefT<T>(obj)) {}
template<typename T> explicit OpaqueRef( typename std::remove_reference<T>::type& obj) : m_ref(new OpaqueRefT<T>(obj)) {}
template<typename T> explicit OpaqueRef( typename std::remove_reference<T>::type&& obj) : m_ref(new OpaqueRefT<T>(obj)) {}
Error message
build/precommit_armv7/opencv/modules/gapi/include/opencv2/gapi/util/any.hpp:69:59: error: call of overloaded 'OpaqueRef(cv::detail::OpaqueRef&)' is ambiguous
holder_impl(arg_t&& a) : v(std::forward<arg_t>(a)) {}
^
/build/precommit_armv7/opencv/modules/gapi/include/opencv2/gapi/util/any.hpp:69:59: note: candidates are:
In file included from /build/precommit_armv7/opencv/modules/gapi/include/opencv2/gapi/garg.hpp:23:0,
from /build/precommit_armv7/opencv/modules/gapi/include/opencv2/gapi/gcall.hpp:11,
from /build/precommit_armv7/opencv/modules/gapi/include/opencv2/gapi/gkernel.hpp:20,
from /build/precommit_armv7/opencv/modules/gapi/include/opencv2/gapi/core.hpp:19,
from /build/precommit_armv7/opencv/modules/gapi/src/precomp.hpp:14,
from /build/precommit_armv7/opencv/modules/gapi/src/backends/cpu/gcpubackend.cpp:8:
/build/precommit_armv7/opencv/modules/gapi/include/opencv2/gapi/gopaque.hpp:222:39: note: cv::detail::OpaqueRef::OpaqueRef(T&&) [with T = cv::detail::OpaqueRef&]
template<typename T> explicit OpaqueRef( T&& obj) : m_ref(new OpaqueRefT<T>(obj)) {}
^
/build/precommit_armv7/opencv/modules/gapi/include/opencv2/gapi/gopaque.hpp:221:39: note: cv::detail::OpaqueRef::OpaqueRef(T&) [with T = cv::detail::OpaqueRef]
template<typename T> explicit OpaqueRef( T& obj) : m_ref(new OpaqueRefT<T>(obj)) {}
^
/build/precommit_armv7/opencv/modules/gapi/include/opencv2/gapi/gopaque.hpp:220:39: note: cv::detail::OpaqueRef::OpaqueRef(const T&) [with T = cv::detail::OpaqueRef]
template<typename T> explicit OpaqueRef(const T& obj) : m_ref(new OpaqueRefT<T>(obj)) {}
^
/build/precommit_armv7/opencv/modules/gapi/include/opencv2/gapi/gopaque.hpp:209:11: note: cv::detail::OpaqueRef::OpaqueRef(const cv::detail::OpaqueRef&)
class OpaqueRef
^
G-API: GOpaque implementation * Stub initial copypasted solution * Fix mov test and add a couple of others * Fix warnings * More code coverage and tests * fix macos warning * address review comments * Address review comments and fix indentation * Fix build on armv7
This pullrequest adds a new type in G-API - GOpaque which is designed to store a single custom user type.
Currently it's almost copypasted GArray except other internal types are not related to vector.