Allow the single-arg Values() overload to to conversions, just like every other

overload.
This commit is contained in:
kosak
2015-07-19 22:21:58 +00:00
parent 7d7beaa155
commit 9e38d77f65
2 changed files with 6 additions and 18 deletions

View File

@@ -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.