aboutsummaryrefslogtreecommitdiffstats
path: root/include/gtest/internal/gtest-param-util-generated.h
diff options
context:
space:
mode:
authorkosak <kosak@google.com>2015-07-19 22:21:58 +0000
committerkosak <kosak@google.com>2015-07-19 22:21:58 +0000
commit9e38d77f65eb35111701670608d8da223645e7e7 (patch)
treea97b00b04c0f1850582d09a12a7c1d2485a1039f /include/gtest/internal/gtest-param-util-generated.h
parent7d7beaa155717adafb783a52b6dfa37fae15df3f (diff)
downloadgoogletest-9e38d77f65eb35111701670608d8da223645e7e7.tar.gz
googletest-9e38d77f65eb35111701670608d8da223645e7e7.tar.bz2
googletest-9e38d77f65eb35111701670608d8da223645e7e7.zip
Allow the single-arg Values() overload to to conversions, just like every other
overload.
Diffstat (limited to 'include/gtest/internal/gtest-param-util-generated.h')
-rw-r--r--include/gtest/internal/gtest-param-util-generated.h5
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.