fix compilation on macOS clang and c++20
In file included from cfg_subnets6_unittest.cc:24:
In file included from ../../../../src/lib/testutils/gtest_utils.h:10:
/Users/razvan/isc/git/googletest/googletest/include/gtest/gtest.h:1507:11: error: use of overloaded operator '==' is ambiguous (with operand types 'const int' and 'const isc::util::Triplet<unsigned int>')
if (lhs == rhs) {
~~~ ^ ~~~
/Users/razvan/isc/git/googletest/googletest/include/gtest/gtest.h:1534:12: note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<int, isc::util::Triplet<unsigned int>>' requested here
return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
^
cfg_subnets6_unittest.cc:68:5: note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<int, isc::util::Triplet<unsigned int>, nullptr>' requested here
ASSERT_EQ(exp_valid, subnet->getValid()) << "subnetID:"
^
/Users/razvan/isc/git/googletest/googletest/include/gtest/gtest.h:2032:32: note: expanded from macro 'ASSERT_EQ'
# define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2)
^
/Users/razvan/isc/git/googletest/googletest/include/gtest/gtest.h:2016:54: note: expanded from macro 'GTEST_ASSERT_EQ'
ASSERT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
^
../../../../src/lib/util/optional.h:67:10: note: candidate function (with reversed parameter order)
bool operator==(const T& other) const {
^
/Users/razvan/isc/git/googletest/googletest/include/gtest/gtest.h:1507:11: note: built-in candidate operator==(int, unsigned int)
if (lhs == rhs) {
^
/Users/razvan/isc/git/googletest/googletest/include/gtest/gtest.h:1507:11: note: built-in candidate operator==(float, unsigned int)
/Users/razvan/isc/git/googletest/googletest/include/gtest/gtest.h:1507:11: note: built-in candidate operator==(double, unsigned int)
/Users/razvan/isc/git/googletest/googletest/include/gtest/gtest.h:1507:11: note: built-in candidate operator==(long double, unsigned int)
/Users/razvan/isc/git/googletest/googletest/include/gtest/gtest.h:1507:11: note: built-in candidate operator==(int, float)
/Users/razvan/isc/git/googletest/googletest/include/gtest/gtest.h:1507:11: note: built-in candidate operator==(int, double)
/Users/razvan/isc/git/googletest/googletest/include/gtest/gtest.h:1507:11: note: built-in candidate operator==(int, long double)
/Users/razvan/isc/git/googletest/googletest/include/gtest/gtest.h:1507:11: note: built-in candidate operator==(int, int)
/Users/razvan/isc/git/googletest/googletest/include/gtest/gtest.h:1507:11: note: built-in candidate operator==(int, long)
/Users/razvan/isc/git/googletest/googletest/include/gtest/gtest.h:1507:11: note: built-in candidate operator==(int, long long)
/Users/razvan/isc/git/googletest/googletest/include/gtest/gtest.h:1507:11: note: built-in candidate operator==(int, __int128)
/Users/razvan/isc/git/googletest/googletest/include/gtest/gtest.h:1507:11: note: built-in candidate operator==(int, unsigned long)
/Users/razvan/isc/git/googletest/googletest/include/gtest/gtest.h:1507:11: note: built-in candidate operator==(int, unsigned long long)
/Users/razvan/isc/git/googletest/googletest/include/gtest/gtest.h:1507:11: note: built-in candidate operator==(int, unsigned __int128)
/Users/razvan/isc/git/googletest/googletest/include/gtest/gtest.h:1507:11: note: built-in candidate operator==(long, unsigned int)
/Users/razvan/isc/git/googletest/googletest/include/gtest/gtest.h:1507:11: note: built-in candidate operator==(long long, unsigned int)
/Users/razvan/isc/git/googletest/googletest/include/gtest/gtest.h:1507:11: note: built-in candidate operator==(__int128, unsigned int)
/Users/razvan/isc/git/googletest/googletest/include/gtest/gtest.h:1507:11: note: built-in candidate operator==(unsigned int, unsigned int)
/Users/razvan/isc/git/googletest/googletest/include/gtest/gtest.h:1507:11: note: built-in candidate operator==(unsigned long, unsigned int)
/Users/razvan/isc/git/googletest/googletest/include/gtest/gtest.h:1507:11: note: built-in candidate operator==(unsigned long long, unsigned int)
/Users/razvan/isc/git/googletest/googletest/include/gtest/gtest.h:1507:11: note: built-in candidate operator==(unsigned __int128, unsigned int)
Edited by Razvan Becheriu