diff options
author | Tom Hughes <tomhughes@google.com> | 2023-01-24 19:09:35 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-01-24 19:10:09 (GMT) |
commit | 2491710524094dc3b77cfa4e8eda2ba8edb0d91c (patch) | |
tree | 2c9bdfb14ae930e22a89dcbee3ae97f93a26451a /googlemock/include/gmock/gmock-more-actions.h | |
parent | 408471e20cfaa7ccd585fe5e1c6e7b6fba8ce06e (diff) | |
download | googletest-2491710524094dc3b77cfa4e8eda2ba8edb0d91c.zip googletest-2491710524094dc3b77cfa4e8eda2ba8edb0d91c.tar.gz googletest-2491710524094dc3b77cfa4e8eda2ba8edb0d91c.tar.bz2 |
Fix formatting of C++ files
PiperOrigin-RevId: 504325204
Change-Id: Iaa1d6d0ab1dccaaeef26f9cb109d530835499240
Diffstat (limited to 'googlemock/include/gmock/gmock-more-actions.h')
-rw-r--r-- | googlemock/include/gmock/gmock-more-actions.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/googlemock/include/gmock/gmock-more-actions.h b/googlemock/include/gmock/gmock-more-actions.h index 148ac01..78169b1 100644 --- a/googlemock/include/gmock/gmock-more-actions.h +++ b/googlemock/include/gmock/gmock-more-actions.h @@ -526,9 +526,10 @@ GMOCK_INTERNAL_LIST_##value_params)){}) \ GMOCK_ACTION_CLASS_(name, value_params)(const GMOCK_ACTION_CLASS_( \ name, value_params) &) noexcept GMOCK_INTERNAL_DEFN_COPY_ \ - ##value_params GMOCK_ACTION_CLASS_(name, value_params)( \ - GMOCK_ACTION_CLASS_(name, value_params) &&) noexcept \ - GMOCK_INTERNAL_DEFN_COPY_##value_params template <typename F> \ + ##value_params \ + GMOCK_ACTION_CLASS_(name, value_params)(GMOCK_ACTION_CLASS_( \ + name, value_params) &&) noexcept GMOCK_INTERNAL_DEFN_COPY_ \ + ##value_params template <typename F> \ operator ::testing::Action<F>() const { \ return GMOCK_PP_IF( \ GMOCK_PP_IS_EMPTY(GMOCK_INTERNAL_COUNT_##value_params), \ @@ -602,13 +603,13 @@ template <std::size_t index, typename... Params> struct InvokeArgumentAction { template <typename... Args, typename = typename std::enable_if<(index < sizeof...(Args))>::type> - auto operator()(Args&&... args) const -> decltype(internal::InvokeArgument( + auto operator()(Args &&...args) const -> decltype(internal::InvokeArgument( std::get<index>(std::forward_as_tuple(std::forward<Args>(args)...)), - std::declval<const Params&>()...)) { - internal::FlatTuple<Args&&...> args_tuple(FlatTupleConstructTag{}, - std::forward<Args>(args)...); - return params.Apply([&](const Params&... unpacked_params) { - auto&& callable = args_tuple.template Get<index>(); + std::declval<const Params &>()...)) { + internal::FlatTuple<Args &&...> args_tuple(FlatTupleConstructTag{}, + std::forward<Args>(args)...); + return params.Apply([&](const Params &...unpacked_params) { + auto &&callable = args_tuple.template Get<index>(); return internal::InvokeArgument( std::forward<decltype(callable)>(callable), unpacked_params...); }); @@ -648,7 +649,7 @@ struct InvokeArgumentAction { // later. template <std::size_t index, typename... Params> internal::InvokeArgumentAction<index, typename std::decay<Params>::type...> -InvokeArgument(Params&&... params) { +InvokeArgument(Params &&...params) { return {internal::FlatTuple<typename std::decay<Params>::type...>( internal::FlatTupleConstructTag{}, std::forward<Params>(params)...)}; } |