-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.5.2
-
None
-
cff13c241 (dev), 599525ef5 (6.5), 687415e10 (6.6)
Consider the following code that compiles successfully:
#include <optional> #include <variant> #include <QTypeInfo> struct S {}; static_assert(!QTypeTraits::has_operator_less_than_v<S>); using T = std::variant<S>; static_assert(!QTypeTraits::has_operator_less_than_v<T>); using U = std::optional<S>; static_assert(!QTypeTraits::has_operator_less_than_v<U>); // However using V = std::optional<T>; static_assert(QTypeTraits::has_operator_less_than_v<V>);
It seems to me that the last `static_assert` ought to fail and that the current behavior is a bug. This shows up if one tries to register `V` as a meta type.
For Gerrit Dashboard: QTBUG-115646 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
493472,3 | QMetaType: fix recursive detection of std::optional operators | dev | qt/qtbase | Status: MERGED | +2 | 0 |
493532,2 | QMetaType: fix recursive detection of std::optional operators | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |
493533,2 | QMetaType: fix recursive detection of std::optional operators | 6.5 | qt/qtbase | Status: MERGED | +2 | 0 |