summaryrefslogtreecommitdiffstats
path: root/googlemock/include/gmock
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2020-11-12 16:12:19 (GMT)
committerMark Barolak <mbar@google.com>2020-11-12 18:32:33 (GMT)
commita1adec799a3252016dabce83f8effcebc51b8050 (patch)
treecfbc0066227136d6c1c2cc9b186e9d6096578dfb /googlemock/include/gmock
parente7ed50fd137dd7626bbb21dfc41982454dcff69b (diff)
downloadgoogletest-a1adec799a3252016dabce83f8effcebc51b8050.zip
googletest-a1adec799a3252016dabce83f8effcebc51b8050.tar.gz
googletest-a1adec799a3252016dabce83f8effcebc51b8050.tar.bz2
Googletest export
Use a tagged constructor for FlatTuple instead. Some versions of MSVC are getting confused with that constructor and generating invalid code. PiperOrigin-RevId: 342050957
Diffstat (limited to 'googlemock/include/gmock')
-rw-r--r--googlemock/include/gmock/gmock-generated-actions.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/googlemock/include/gmock/gmock-generated-actions.h b/googlemock/include/gmock/gmock-generated-actions.h
index 9240ce9..62909ea 100644
--- a/googlemock/include/gmock/gmock-generated-actions.h
+++ b/googlemock/include/gmock/gmock-generated-actions.h
@@ -520,7 +520,8 @@ struct InvokeArgumentAction {
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(std::forward<Args>(args)...);
+ 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(
@@ -564,7 +565,7 @@ template <std::size_t index, typename... Params>
internal::InvokeArgumentAction<index, typename std::decay<Params>::type...>
InvokeArgument(Params&&... params) {
return {internal::FlatTuple<typename std::decay<Params>::type...>(
- std::forward<Params>(params)...)};
+ internal::FlatTupleConstructTag{}, std::forward<Params>(params)...)};
}
#ifdef _MSC_VER