mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-06-28 17:33:14 -04:00
Replace template conditionals with C++20 requires
clause
Related: https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-constraints.html PR #19424.
This commit is contained in:
parent
33d767b765
commit
5c06d0aa75
6 changed files with 23 additions and 31 deletions
|
@ -47,14 +47,14 @@ public:
|
|||
private slots:
|
||||
void testHasMappedType() const
|
||||
{
|
||||
QVERIFY(static_cast<bool>(Algorithm::HasMappedType<std::map<bool, bool>>::value));
|
||||
QVERIFY(static_cast<bool>(Algorithm::HasMappedType<std::unordered_map<bool, bool>>::value));
|
||||
QVERIFY(static_cast<bool>(Algorithm::HasMappedType<QHash<bool, bool>>::value));
|
||||
QVERIFY(static_cast<bool>(Algorithm::HasMappedType<QMap<bool, bool>>::value));
|
||||
static_assert(Algorithm::HasMappedType<std::map<bool, bool>>);
|
||||
static_assert(Algorithm::HasMappedType<std::unordered_map<bool, bool>>);
|
||||
static_assert(Algorithm::HasMappedType<QHash<bool, bool>>);
|
||||
static_assert(Algorithm::HasMappedType<QMap<bool, bool>>);
|
||||
|
||||
QVERIFY(!static_cast<bool>(Algorithm::HasMappedType<std::set<bool>>::value));
|
||||
QVERIFY(!static_cast<bool>(Algorithm::HasMappedType<std::unordered_set<bool>>::value));
|
||||
QVERIFY(!static_cast<bool>(Algorithm::HasMappedType<QSet<bool>>::value));
|
||||
static_assert(!Algorithm::HasMappedType<std::set<bool>>);
|
||||
static_assert(!Algorithm::HasMappedType<std::unordered_set<bool>>);
|
||||
static_assert(!Algorithm::HasMappedType<QSet<bool>>);
|
||||
}
|
||||
|
||||
void testMappedTypeRemoveIf() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue