Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
-
None
-
2
-
Foundations Sprint 79
Description
static_assert(std::is_convertible_v<QPointer<QWidget>, QPointer<QObject>>, "is not covertable");
raises an error.
After adding:
template<typename Up, typename = std::enable_if_t<std::is_convertible_v<Up *, T *>>>
QPointer(const QPointer<Up> &p) noexcept
: QPointer{p.data()}
{}
the code passes.
It would be quite handy if QPointer could be convertable.