From a3f2857ebc0792114a0cf52b62532d73e8d5a338 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 18 Apr 2023 15:06:23 +0200 Subject: [PATCH] QContainerInfo: Detect presence of reserve() This is handy if you want to reserve if possible or just fill the container right away if not. Task-number: QTBUG-112227 Change-Id: I3d085c1ce2448150bc044c3513572e02161244f4 Reviewed-by: Fabian Kosmale --- src/corelib/global/qcontainerinfo.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/corelib/global/qcontainerinfo.h b/src/corelib/global/qcontainerinfo.h index e27877073f..14468510a5 100644 --- a/src/corelib/global/qcontainerinfo.h +++ b/src/corelib/global/qcontainerinfo.h @@ -50,6 +50,11 @@ inline constexpr bool has_size_v = false; template inline constexpr bool has_size_v> = true; +template +inline constexpr bool has_reserve_v = false; +template +inline constexpr bool has_reserve_v> = true; + template inline constexpr bool has_clear_v = false; template