andishgar commented on issue #47101:
URL: https://github.com/apache/arrow/issues/47101#issuecomment-3110830173
>Is this part correct? ValueTypeSubset v1 = v; not ValueTypeSubset v1 =
int64_t{1};?
Regarding this, I mean first creating an object of type
std::variant<int64_t, double>, and then assigning it to a std::variant<int64_t,
double, std::string> object.
Such an assignment is not directly possible with std::variant, but it is
allowed with the Boost version.
However, since this kind of conversion would only happen in the internal
implementation, I think it's fine to stick with a simple converter function
like the one below.
```c++
ValueType ConvertToSuperSet(ValueTypeSubset value) {
return std::visit([&](auto v) {
return ValueType(v);
}, value);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]