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