gapi(test): avoid anonymous namespace types as template parameters

This commit is contained in:
Alexander Alekhin 2020-11-26 21:21:05 +00:00
parent d65c6af3a5
commit 7efc0011fd
3 changed files with 10 additions and 5 deletions

View File

@ -22,8 +22,10 @@ struct Name \
namespace opencv_test
{
namespace
{
// types from anonymous namespace doesn't work well with templates
inline namespace gapi_ocv_stateful_kernel_test_utils {
struct UserStruct
{
UserStruct() = default;
@ -41,7 +43,8 @@ private:
short _myShortVal;
float _myFloatVal;
};
} // anonymous namespace
} // namespace
} // opencv_test
#endif // OPENCV_GAPI_OCV_STATEFUL_KERNEL_TESTS_UTILS_HPP

View File

@ -240,7 +240,8 @@ TEST(GArray_VectorRef, TestMov)
EXPECT_EQ(V{}, vtest);
}
namespace {
// types from anonymous namespace doesn't work well with templates
inline namespace gapi_array_tests {
struct MyTestStruct {
int i;
float f;

View File

@ -284,7 +284,8 @@ TEST(GOpaque_OpaqueRef, TestMov)
EXPECT_NE(test, mov.rref<I>()); // ref lost the data
}
namespace {
// types from anonymous namespace doesn't work well with templates
inline namespace gapi_opaque_tests {
struct MyTestStruct {
int i;
float f;