1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

build: w/a compiler warnings for GCC 11-12 and Clang 13, reduce build output

This commit is contained in:
Maksim Shabunin
2023-07-06 19:27:16 +03:00
parent 8839bd572e
commit 09944a83d9
8 changed files with 50 additions and 25 deletions
@@ -509,6 +509,11 @@ namespace util
return v.index() == util::variant<Types...>::template index_of<T>();
}
#if defined(__GNUC__) && (__GNUC__ == 11 || __GNUC__ == 12)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
template<typename... Us> bool operator==(const variant<Us...> &lhs,
const variant<Us...> &rhs)
{
@@ -524,6 +529,10 @@ namespace util
return (eqs[lhs.index()])(lhs.memory, rhs.memory);
}
#if defined(__GNUC__) && (__GNUC__ == 11 || __GNUC__ == 12)
#pragma GCC diagnostic pop
#endif
template<typename... Us> bool operator!=(const variant<Us...> &lhs,
const variant<Us...> &rhs)
{