aboutsummaryrefslogtreecommitdiff
path: root/lib/util.h
diff options
context:
space:
mode:
authorBlack Hat <bhat@encom.eu.org>2018-09-12 21:04:29 +0800
committerGitHub <noreply@github.com>2018-09-12 21:04:29 +0800
commit1e78ca6b9c09cb16677ab3db1656085adbd4901b (patch)
tree633a6e8fe8a244b44b510b608ec3103431a0e042 /lib/util.h
parent79f338877dec3de5ec7394f190025395877cb00b (diff)
parent2a1596c16baad77fc80391c66694101f91028deb (diff)
downloadlibquotient-1e78ca6b9c09cb16677ab3db1656085adbd4901b.tar.gz
libquotient-1e78ca6b9c09cb16677ab3db1656085adbd4901b.zip
Merge pull request #1 from QMatrixClient/master
Merge to latest commit.
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));