QCache: Fix the usage of std::is_nothrow_assignable_v

The std::is_nothrow_assignable_v template takes two template
parameters. Current clang nightly errors out on the previous code,
while earlier versions, and GCC, fail to diagnose the missing
template parameter.

Change-Id: I8ae7d5b9a9e89c5579e5526fb29d4da5cd1ab859
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
Martin Storsjö 2020-08-11 12:02:12 +03:00
parent f8af82e3b3
commit f263385471

View File

@ -111,7 +111,7 @@ class QCache
{
return Node(k, std::move(t));
}
void replace(const Value &t) noexcept(std::is_nothrow_assignable_v<T>)
void replace(const Value &t) noexcept(std::is_nothrow_assignable_v<T, T>)
{
value = t;
}