Skip to content

Commit 6ca5c54

Browse files
committed
New issue from Jiang An: "Size type mismatch in constraints involving Cpp17Allocator"
1 parent 8922a21 commit 6ca5c54

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

xml/issue4258.xml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version='1.0' encoding='utf-8' standalone='no'?>
2+
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+
<issue num="4258" status="New">
5+
<title>Size type mismatch in constraints involving <i>Cpp17Allocator</i></title>
6+
<section><sref ref="[allocator.requirements.general]"/></section>
7+
<submitter>Jiang An</submitter>
8+
<date>5 May 2025</date>
9+
<priority>99</priority>
10+
11+
<discussion>
12+
<p>
13+
It seems assumed that a `size_t` value can be passed to an allocator's `allocate` member
14+
function per the <tt><i>simple-allocator</i></tt> exposition-only concept in
15+
<sref ref="[allocator.requirements.general]"/> and the minimal constraints for
16+
allocator types in <sref ref="[container.reqmts]"/>.
17+
<p/>
18+
However, it is not exactly required that a type meeting the <i>Cpp17Allocator</i> requirements
19+
can be used with `size_t` values, because only <tt>allocator_traits&lt;A&gt;::size_type</tt>,
20+
which is possibly not `size_t`, is required to be usable with the allocator.
21+
<p/>
22+
Do we want to change these constraints, or change the <i>Cpp17Allocator</i> requirements to
23+
require accepting `size_t` values?
24+
</p>
25+
</discussion>
26+
27+
<resolution>
28+
</resolution>
29+
30+
</issue>

0 commit comments

Comments
 (0)