Enable safe matcher casts from Matcher<const T&> to Matcher<T>.
PiperOrigin-RevId: 715826130 Change-Id: Id962fd456f6da21ea2a909f331f92d814f1dad46
This commit is contained in:
committed by
Copybara-Service
parent
504ea69cf7
commit
e4ece4881d
@@ -936,8 +936,8 @@ casts a matcher `m` to type `Matcher<T>`. To ensure safety, gMock checks that
|
||||
floating-point numbers), the conversion from `T` to `U` is not lossy (in
|
||||
other words, any value representable by `T` can also be represented by `U`);
|
||||
and
|
||||
3. When `U` is a reference, `T` must also be a reference (as the underlying
|
||||
matcher may be interested in the address of the `U` value).
|
||||
3. When `U` is a non-const reference, `T` must also be a reference (as the
|
||||
underlying matcher may be interested in the address of the `U` value).
|
||||
|
||||
The code won't compile if any of these conditions isn't met.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user