Details
-
Suggestion
-
Resolution: Won't Do
-
Not Evaluated
-
None
-
5.13.0
-
None
Description
Currently QLatin1String can not be constructed as constexpr string due to usage of strlen() in the constructor. Changing the constructor like in the workaround below overcomes that limitation:
struct ConstLatin1String : public QLatin1String { constexpr ConstLatin1String(const char* const s) : QLatin1String(s, static_cast<int>(std::char_traits<char>::length(s))) {} };