Skip to content

Commit 2d684ef

Browse files
Abseil Teamcopybara-github
authored andcommitted
Use std::forward on GoogleTest matcher arguments
This prevents a diagnostic from triggering for a missing std::move. PiperOrigin-RevId: 631094640 Change-Id: I4ab33964c65f41240fb54a6bf7d0261836fd78e7
1 parent 2d16ed0 commit 2d684ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

googlemock/include/gmock/gmock-matchers.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5606,8 +5606,8 @@ PolymorphicMatcher<internal::ExceptionMatcherImpl<Err>> ThrowsMessage(
56065606

56075607
#define GMOCK_INTERNAL_MATCHER_ARGS_USAGE(args) \
56085608
GMOCK_PP_TAIL(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_MATCHER_ARG_USAGE, , args))
5609-
#define GMOCK_INTERNAL_MATCHER_ARG_USAGE(i, data_unused, arg_unused) \
5610-
, gmock_p##i
5609+
#define GMOCK_INTERNAL_MATCHER_ARG_USAGE(i, data_unused, arg) \
5610+
, ::std::forward<arg##_type>(gmock_p##i)
56115611

56125612
// To prevent ADL on certain functions we put them on a separate namespace.
56135613
using namespace no_adl; // NOLINT

0 commit comments

Comments
 (0)