This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.
allocator_arg_t
/allocator_arg
in the description
of uses-allocator constructionSection: 20.2.8.2 [allocator.uses.construction] Status: New Submitter: Jiang An Opened: 2025-08-06 Last modified: 2025-08-09
Priority: Not Prioritized
View other active issues in [allocator.uses.construction].
View all other issues in [allocator.uses.construction].
View all issues with New status.
Discussion:
Currently, 20.2.8.2 [allocator.uses.construction] bullet 2.2 states:
Otherwise, if
T
has a constructor invocable asT(allocator_arg, alloc, args...)
(leading-allocator convention), […]
However, when forming construction arguments in the utility functions, we're actually using cv-unqualified
rvalue of allocator_arg_t
, which can be inferred from using plain allocator_arg_t
but not
const allocator_arg_t&
in 20.2.8.2 [allocator.uses.construction] bullet 5.2.
allocator_arg_t
is considered correct, I think we should fix the description.
Proposed resolution:
This wording is relative to this CD preview draft.
Modify 20.2.8.2 [allocator.uses.construction] as indicated:
-2- The following utility functions support three conventions for passing
alloc
to a constructor:
(2.1) — […]
(2.2) — Otherwise, if
T
has a constructor invocable asT(
(leading-allocator convention), then uses-allocator construction chooses this constructor form.allocator_argallocator_arg_t{}, alloc, args...)(2.3) — […]