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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user