summaryrefslogtreecommitdiffstats
path: root/googletest/include/gtest
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2020-11-12 11:12:19 -0500
committerMark Barolak <mbar@google.com>2020-11-12 13:32:33 -0500
commita1adec799a3252016dabce83f8effcebc51b8050 (patch)
treecfbc0066227136d6c1c2cc9b186e9d6096578dfb /googletest/include/gtest
parente7ed50fd137dd7626bbb21dfc41982454dcff69b (diff)
downloadgoogletest-a1adec799a3252016dabce83f8effcebc51b8050.tar.gz
googletest-a1adec799a3252016dabce83f8effcebc51b8050.zip
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 'googletest/include/gtest')
-rw-r--r--googletest/include/gtest/internal/gtest-internal.h11
-rw-r--r--googletest/include/gtest/internal/gtest-param-util.h2
2 files changed, 4 insertions, 9 deletions
diff --git a/googletest/include/gtest/internal/gtest-internal.h b/googletest/include/gtest/internal/gtest-internal.h
index f00d78f2..8dc74bbb 100644
--- a/googletest/include/gtest/internal/gtest-internal.h
+++ b/googletest/include/gtest/internal/gtest-internal.h
@@ -1285,14 +1285,9 @@ class FlatTuple
public:
FlatTuple() = default;
- template <typename... Args,
- typename = typename std::enable_if<
- !std::is_same<void(FlatTuple), void(typename std::decay<
- Args>::type...)>::value &&
- (sizeof...(T) >= 1)>::type>
- explicit FlatTuple(Args&&... args)
- : FlatTuple::FlatTupleBase(FlatTupleConstructTag{},
- std::forward<Args>(args)...) {}
+ template <typename... Args>
+ explicit FlatTuple(FlatTupleConstructTag tag, Args&&... args)
+ : FlatTuple::FlatTupleBase(tag, std::forward<Args>(args)...) {}
using FlatTuple::FlatTupleBase::Apply;
using FlatTuple::FlatTupleBase::Get;
diff --git a/googletest/include/gtest/internal/gtest-param-util.h b/googletest/include/gtest/internal/gtest-param-util.h
index 05696a56..d12bd552 100644
--- a/googletest/include/gtest/internal/gtest-param-util.h
+++ b/googletest/include/gtest/internal/gtest-param-util.h
@@ -791,7 +791,7 @@ namespace internal {
template <typename... Ts>
class ValueArray {
public:
- explicit ValueArray(Ts... v) : v_(std::move(v)...) {}
+ explicit ValueArray(Ts... v) : v_(FlatTupleConstructTag{}, std::move(v)...) {}
template <typename T>
operator ParamGenerator<T>() const { // NOLINT
OpenPOWER on IntegriCloud