diff options
Diffstat (limited to 'include/gtest/internal/gtest-param-util-generated.h')
-rw-r--r-- | include/gtest/internal/gtest-param-util-generated.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/gtest/internal/gtest-param-util-generated.h b/include/gtest/internal/gtest-param-util-generated.h index 6dbaf4b7..4d1d81d2 100644 --- a/include/gtest/internal/gtest-param-util-generated.h +++ b/include/gtest/internal/gtest-param-util-generated.h @@ -79,7 +79,10 @@ class ValueArray1 { explicit ValueArray1(T1 v1) : v1_(v1) {} template <typename T> - operator ParamGenerator<T>() const { return ValuesIn(&v1_, &v1_ + 1); } + operator ParamGenerator<T>() const { + const T array[] = {static_cast<T>(v1_)}; + return ValuesIn(array); + } private: // No implementation - assignment is unsupported. |