From 38c51dcfc478d9aa759a25978a64f9f369ce0952 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Sun, 15 Dec 2024 13:08:25 +0100 Subject: [PATCH] associative_erase_if: use type_dependent_false Avoid a sizeof(X) == 0, which is IFNDR, in favor of the dedicated feature (type_dependent_false). Change-Id: I38441cfe3d5c18800bf61bcdd11268cb97d40ec6 Reviewed-by: Thiago Macieira --- src/corelib/tools/qcontainertools_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qcontainertools_impl.h b/src/corelib/tools/qcontainertools_impl.h index 57c9c298356..425ec6ba394 100644 --- a/src/corelib/tools/qcontainertools_impl.h +++ b/src/corelib/tools/qcontainertools_impl.h @@ -456,7 +456,7 @@ auto associative_erase_if(Container &c, Predicate &pred) ++it; } } else { - static_assert(sizeof(Container) == 0, "Predicate has an incompatible signature"); + static_assert(type_dependent_false(), "Predicate has an incompatible signature"); } }