From 8dacbe75841e339e546607b32ed21fb10366faaa Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Mon, 9 Apr 2018 12:29:06 +0300 Subject: [PATCH] android: std::exception_ptr is not available on some platforms (even with enabled C++11) --- modules/core/src/parallel.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/core/src/parallel.cpp b/modules/core/src/parallel.cpp index 82ca50411a..4e01236d34 100644 --- a/modules/core/src/parallel.cpp +++ b/modules/core/src/parallel.cpp @@ -131,7 +131,9 @@ #ifndef CV__EXCEPTION_PTR -# ifdef CV_CXX11 +# if defined(__ANDROID__) && defined(ATOMIC_INT_LOCK_FREE) && ATOMIC_INT_LOCK_FREE < 2 +# define CV__EXCEPTION_PTR 0 // Not supported, details: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58938 +# elif defined(CV_CXX11) # define CV__EXCEPTION_PTR 1 # elif defined(CV_ICC) # define CV__EXCEPTION_PTR 1 @@ -145,7 +147,7 @@ #endif #ifndef CV__EXCEPTION_PTR # define CV__EXCEPTION_PTR 0 -#else +#elif CV__EXCEPTION_PTR # include // std::exception_ptr #endif