Does Qt have its own boost::optional alternative, or should I just use boost::optional?
In C++17 there was introduced std::optional: https://en.cppreference.com/w/cpp/utility/optional
I think it's more usefull in Qt project, than boost one. There is still no any QOptional class in Qt.
Qt has a 'variant' type, but not an 'optional' type. I think that boost::optional
(or, in newer C++ versions, std::optional
) is a reasonable choice.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With