diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-08-23 10:28:59 +0200 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-08-23 10:28:59 +0200 |
commit | bc105c2fef5334d0654071f72e248a0892a9b20b (patch) | |
tree | f6df09c81b371595b2f417cd9057a40ff64f1771 /lib/util.cpp | |
parent | 47786ad98b7c70f6719599d89a706fa820bb8b8e (diff) | |
download | libquotient-bc105c2fef5334d0654071f72e248a0892a9b20b.tar.gz libquotient-bc105c2fef5334d0654071f72e248a0892a9b20b.zip |
More cleanup; drop Qt bearer management on Qt 5.15+
Qt 5.15 deprecates bearer management.
Diffstat (limited to 'lib/util.cpp')
-rw-r--r-- | lib/util.cpp | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/lib/util.cpp b/lib/util.cpp index 61661de8..797f6d69 100644 --- a/lib/util.cpp +++ b/lib/util.cpp @@ -126,32 +126,30 @@ QString Quotient::serverPart(const QString& mxId) % ServerPartRegEx % ")$"; static QRegularExpression parser( re, - QRegularExpression::UseUnicodePropertiesOption); // Because Asian - // digits + QRegularExpression::UseUnicodePropertiesOption); // Because Asian digits return parser.match(mxId).captured(1); } // Tests for function_traits<> -#ifdef Q_CC_CLANG -# pragma clang diagnostic push -# pragma ide diagnostic ignored "OCSimplifyInspection" -#endif using namespace Quotient; -int f(); -static_assert(std::is_same<fn_return_t<decltype(f)>, int>::value, +int f_(); +static_assert(std::is_same<fn_return_t<decltype(f_)>, int>::value, "Test fn_return_t<>"); -void f1(int, QString); -static_assert(std::is_same<fn_arg_t<decltype(f1), 1>, QString>::value, +void f1_(int, QString); +static_assert(std::is_same<fn_arg_t<decltype(f1_), 1>, QString>::value, "Test fn_arg_t<>"); struct Fo { int operator()(); + static constexpr auto l = [] { return 0.0f; }; }; static_assert(std::is_same<fn_return_t<Fo>, int>::value, "Test return type of function object"); +static_assert(std::is_same<fn_return_t<decltype(Fo::l)>, float>::value, + "Test return type of lambda"); struct Fo1 { void operator()(int); @@ -159,20 +157,10 @@ struct Fo1 { static_assert(std::is_same<fn_arg_t<Fo1>, int>(), "Test fn_arg_t defaulting to first argument"); -#if (!defined(_MSC_VER) || _MSC_VER >= 1910) -static auto l = [] { return 1; }; -static_assert(std::is_same<fn_return_t<decltype(l)>, int>::value, - "Test fn_return_t<> with lambda"); -#endif - template <typename T> -QString ft(T&&) +static QString ft(T&&) { return {}; } static_assert(std::is_same<fn_arg_t<decltype(ft<QString>)>, QString&&>(), "Test function templates"); - -#ifdef Q_CC_CLANG -# pragma clang diagnostic pop -#endif |