Generate relational matchers (Eq,Lt, etc) with CRTP instead of macro.

This commit is contained in:
kosak
2014-11-17 01:47:54 +00:00
parent d370f85b02
commit 506340a66b
2 changed files with 161 additions and 88 deletions

View File

@@ -607,11 +607,11 @@ TEST(MatcherCastTest, FromSameType) {
EXPECT_FALSE(m2.Matches(1));
}
// Implicitly convertible form any type.
// Implicitly convertible from any type.
struct ConvertibleFromAny {
ConvertibleFromAny(int a_value) : value(a_value) {}
template <typename T>
ConvertibleFromAny(const T& a_value) : value(-1) {
ConvertibleFromAny(const T& /*a_value*/) : value(-1) {
ADD_FAILURE() << "Conversion constructor called";
}
int value;