From 8095f601d146fea94f94d3c0a470ccc4209c011e Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Thu, 1 Apr 2021 20:23:29 +0000 Subject: [PATCH] gapi(test): avoid compilation failure with GCC11 --- modules/gapi/test/gapi_async_test.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/gapi/test/gapi_async_test.cpp b/modules/gapi/test/gapi_async_test.cpp index 66b8be4dd3..34a58e90d1 100644 --- a/modules/gapi/test/gapi_async_test.cpp +++ b/modules/gapi/test/gapi_async_test.cpp @@ -356,7 +356,12 @@ template struct cancel : ::testing::Test{}; TYPED_TEST_CASE_P(cancel); -TYPED_TEST_P(cancel, basic){ +TYPED_TEST_P(cancel, basic) +{ +#if defined(__GNUC__) && __GNUC__ >= 11 + // std::vector requests can't handle type with ctor parameter (SelfCanceling) + FAIL() << "Test code is not available due to compilation error with GCC 11"; +#else constexpr int num_tasks = 100; cancel_struct cancel_struct_ {num_tasks}; std::vector requests; requests.reserve(num_tasks); @@ -378,6 +383,7 @@ TYPED_TEST_P(cancel, basic){ } } ASSERT_GT(canceled, 0u); +#endif } namespace {