Skip to content

Commit

Permalink
Use std::forward on GoogleTest matcher arguments
Browse files Browse the repository at this point in the history
This prevents a diagnostic from triggering for a missing std::move.

PiperOrigin-RevId: 631094640
Change-Id: I4ab33964c65f41240fb54a6bf7d0261836fd78e7
  • Loading branch information
Abseil Team authored and copybara-github committed May 6, 2024
1 parent 2d16ed0 commit 2d684ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions googlemock/include/gmock/gmock-matchers.h
Original file line number Diff line number Diff line change
Expand Up @@ -5606,8 +5606,8 @@ PolymorphicMatcher<internal::ExceptionMatcherImpl<Err>> ThrowsMessage(

#define GMOCK_INTERNAL_MATCHER_ARGS_USAGE(args) \
GMOCK_PP_TAIL(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_MATCHER_ARG_USAGE, , args))
#define GMOCK_INTERNAL_MATCHER_ARG_USAGE(i, data_unused, arg_unused) \
, gmock_p##i
#define GMOCK_INTERNAL_MATCHER_ARG_USAGE(i, data_unused, arg) \
, ::std::forward<arg##_type>(gmock_p##i)

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

0 comments on commit 2d684ef

Please sign in to comment.