diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-10-11 20:45:30 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-10-14 00:59:10 +0200 |
commit | 772a10391eead51e2c7c9b50473ef0f8096cef82 (patch) | |
tree | 4e302bb6673c3c8d901a75ba827a6edb9e63d0b0 /src/corelib/global | |
parent | 456ba431e649ac87f5043d18ca2efc35d3dba5e4 (diff) |
Drop qt_is_permutation
It was a workaround until we could depend on C++14's
std::is_permutation overload with 4 args. We now can, and the code
using it is gone anyhow, so drop it.
Change-Id: Ib9af71eeb767c83b1150c482441503288f1987d4
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qglobal.h | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index deb3dfe454..b22e2f526a 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1026,29 +1026,6 @@ QT_WARNING_DISABLE_MSVC(4530) /* C++ exception handler used, but unwind semantic # endif #endif -// Work around MSVC warning about use of 3-arg algorithms -// until we can depend on the C++14 4-arg ones. -// -// These algortithms do NOT check for equal length. -// They need to be treated as if they called the 3-arg version (which they do)! -#ifdef Q_CC_MSVC -# define QT_3ARG_ALG(alg, f1, l1, f2, l2) \ - std::alg(f1, l1, f2, l2) -#else -# define QT_3ARG_ALG(alg, f1, l1, f2, l2) \ - [&f1, &l1, &f2, &l2]() { \ - Q_UNUSED(l2); \ - return std::alg(f1, l1, f2); \ - }() -#endif -template <typename ForwardIterator1, typename ForwardIterator2> -inline bool qt_is_permutation(ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2) -{ - return QT_3ARG_ALG(is_permutation, first1, last1, first2, last2); -} -#undef QT_3ARG_ALG - // this adds const to non-const objects (like std::as_const) template <typename T> constexpr typename std::add_const<T>::type &qAsConst(T &t) noexcept { return t; } |