diff options
-rw-r--r-- | compat/string-literal-operator.hpp | 9 | ||||
-rw-r--r-- | compat/util.hpp | 1 |
2 files changed, 10 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); +} diff --git a/compat/util.hpp b/compat/util.hpp index a1976e35..f679afcf 100644 --- a/compat/util.hpp +++ b/compat/util.hpp @@ -3,6 +3,7 @@ #include "opentrack-library-path.h" #include "ndebug-guard.hpp" #include "run-in-thread.hpp" +#include "string-literal-operator.hpp" #include "meta.hpp" #include "functional.hpp" #include "macros.hpp" |