From 9729028d64929a3c7c6af665a90310f8a30f66c4 Mon Sep 17 00:00:00 2001 From: Mike Kinsner Date: Wed, 22 Nov 2023 10:40:44 -0400 Subject: [PATCH 1/2] Improve default allocator wording The spec currently implies (by my reading) that the default allocator can never fail (even on e.g. memory exhaustion). So the spec makes a stronger guarantee than the named allocator requirement, which probably isn't implementable. The modified wording weakens the guarantee to allow for allocations to fail. --- adoc/chapters/programming_interface.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adoc/chapters/programming_interface.adoc b/adoc/chapters/programming_interface.adoc index 8a35db17..3ea6808f 100644 --- a/adoc/chapters/programming_interface.adoc +++ b/adoc/chapters/programming_interface.adoc @@ -4119,7 +4119,7 @@ STL-based libraries (e.g, Intel's TBB provides an allocator). ==== Default allocators A default allocator is always defined by the implementation. -For allocations greater than size zero, it is guaranteed to return +For allocations greater than size zero, when successful it is guaranteed to return non-[code]#nullptr# and new memory positions every call. The default allocator for const buffers will remove the const-ness of the type (therefore, the default allocator for a buffer of type [code]#const int# will be From 5f8166817c3cdcb18fe33ef2d85fe2a1425014b0 Mon Sep 17 00:00:00 2001 From: Michael Kinsner Date: Wed, 22 Nov 2023 12:12:00 -0400 Subject: [PATCH 2/2] reflow --- adoc/chapters/programming_interface.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adoc/chapters/programming_interface.adoc b/adoc/chapters/programming_interface.adoc index 3ea6808f..646989ef 100644 --- a/adoc/chapters/programming_interface.adoc +++ b/adoc/chapters/programming_interface.adoc @@ -4119,8 +4119,8 @@ STL-based libraries (e.g, Intel's TBB provides an allocator). ==== Default allocators A default allocator is always defined by the implementation. -For allocations greater than size zero, when successful it is guaranteed to return -non-[code]#nullptr# and new memory positions every call. +For allocations greater than size zero, when successful it is guaranteed to +return non-[code]#nullptr# and new memory positions every call. The default allocator for const buffers will remove the const-ness of the type (therefore, the default allocator for a buffer of type [code]#const int# will be an [code]#Allocator)#.