Reputation: 23
I need to change from operator""_qs
to operator""_s
, thanks to Qt 6.8. The following code compiles
// notice no includes or using namespace of any kind
auto const label = u"Foo"_qs;
So I tried the following update
#include <StringLiterals>
using namespace Qt::StringLiterals;
auto const label = u"Foo"_s;
but error C3688: invalid literal suffix '_s'; literal operator or literal operator template 'operator ""_s' not found
My first question is, how does it find operator""_qs
without any include or namespace action?
And the second is obviously, how do I fix the error? I have the suspicion that cmake isn't loading the newest Qt version although I have installed only Qt6.6.
Upvotes: 0
Views: 89