The compiler complains “no matching function to call” when I use ASSERT_PREDn. How do I fix it?
If the predicate function you use in ASSERT_PRED* or EXPECT_PRED* is overloaded or a template, the compiler will have trouble figuring out which overloaded version it should use. ASSERT_PRED_FORMAT* and EXPECT_PRED_FORMAT* don’t have this problem. If you see this error, you might want to switch to (ASSERT|EXPECT)_PRED_FORMAT*, which will also give you a better failure message. If, however, that is not an option, you can resolve the problem by explicitly telling the compiler which version to pick.