summaryrefslogtreecommitdiffhomepage
path: root/compat/string-literal-operator.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'compat/string-literal-operator.hpp')
-rw-r--r--compat/string-literal-operator.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/compat/string-literal-operator.hpp b/compat/string-literal-operator.hpp
new file mode 100644
index 00000000..3ea4eb11
--- /dev/null
+++ b/compat/string-literal-operator.hpp
@@ -0,0 +1,9 @@
+#pragma once
+
+#include <QLatin1String>
+#include <cstddef>
+
+static inline constexpr auto operator"" _qstr(const char* str, std::size_t N)
+{
+ return QLatin1String(str, str + N);
+}