aboutsummaryrefslogtreecommitdiff
path: root/lib/util.h
diff options
context:
space:
mode:
authorJosip Delic <delijati@googlemail.com>2018-09-16 21:26:58 +0200
committerJosip Delic <delijati@googlemail.com>2018-09-16 21:26:58 +0200
commitfad9f09f3a2cd0090c80c9cb817734ce810e6f12 (patch)
treec9a45339a7c8dd1179e61ea0d2d8922738711407 /lib/util.h
parent6bb64db38f4a5f47d275a663861fd216f1bcf612 (diff)
parent52931841d816e2fd128579ef7e51eec1cbd0bb09 (diff)
downloadlibquotient-fad9f09f3a2cd0090c80c9cb817734ce810e6f12.tar.gz
libquotient-fad9f09f3a2cd0090c80c9cb817734ce810e6f12.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'lib/util.h')
-rw-r--r--lib/util.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/util.h b/lib/util.h
index ce166e35..13eec143 100644
--- a/lib/util.h
+++ b/lib/util.h
@@ -40,6 +40,15 @@
_ClassName(_ClassName&&) Q_DECL_EQ_DELETE; \
_ClassName& operator=(_ClassName&&) Q_DECL_EQ_DELETE;
+#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
+// Copy-pasted from Qt 5.10
+template <typename T>
+Q_DECL_CONSTEXPR typename std::add_const<T>::type &qAsConst(T &t) Q_DECL_NOTHROW { return t; }
+// prevent rvalue arguments:
+template <typename T>
+static void qAsConst(const T &&) Q_DECL_EQ_DELETE;
+#endif
+
namespace QMatrixClient
{
// The below enables pretty-printing of enums in logs
@@ -146,15 +155,6 @@ namespace QMatrixClient
template <typename FnT>
using fn_arg_t = typename function_traits<FnT>::arg_type;
-#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
- // Copy-pasted from Qt 5.10
- template <typename T>
- Q_DECL_CONSTEXPR typename std::add_const<T>::type &qAsConst(T &t) Q_DECL_NOTHROW { return t; }
- // prevent rvalue arguments:
- template <typename T>
- static void qAsConst(const T &&) Q_DECL_EQ_DELETE;
-#endif
-
inline auto operator"" _ls(const char* s, std::size_t size)
{
return QLatin1String(s, int(size));