From 38e6588cd90d54d35773c16f33d525de61980696 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Sun, 15 Feb 2026 13:07:10 -0500 Subject: [PATCH] xo-alloc2: extend alloc_for to accept explicit size --- xo-alloc2/include/xo/alloc2/alloc/RAllocator.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xo-alloc2/include/xo/alloc2/alloc/RAllocator.hpp b/xo-alloc2/include/xo/alloc2/alloc/RAllocator.hpp index 62552411..729778e9 100644 --- a/xo-alloc2/include/xo/alloc2/alloc/RAllocator.hpp +++ b/xo-alloc2/include/xo/alloc2/alloc/RAllocator.hpp @@ -32,8 +32,8 @@ namespace xo { : Object(iface, data) {} template - void * alloc_for() noexcept { - return O::iface()->alloc(O::data(), typeseq::id(), sizeof(T)); + void * alloc_for(size_type n = sizeof(T)) noexcept { + return O::iface()->alloc(O::data(), typeseq::id(), n); } template