错误信息
opencv/modules/gapi/test/gapi_async_test.cpp: In member function ‘virtual void opencv_test::gtest_case_output_args_lifetime_::callback<gtest_TypeParam_>::TestBody()’:
opencv/modules/gapi/test/gapi_async_test.cpp:448:26: error: ‘sleep_for’ is not a member of ‘std::this_thread’
448 | std::this_thread::sleep_for(std::chrono::milliseconds{2});
| ^~~~~~~~~
解决方案:
Try to add #include <thread>
into this file (gapi_async_test.cpp or test_precomp.hpp
).