Skip to content

[flat.map.defn,flat.multimap.defn] Deduction guide needs to default Allocator to be useful LWG3786 #5800

Closed
@JohelEGP

Description

@JohelEGP

Is this right? What does it mean that the previous template parameter Compare is defaulted, but Allocator isn't, even though both corresponding function parameters are defaulted? Seems like you can't get this to work without defaulting this Allocator: https://godbolt.org/z/fYesrsbMz.

           class Allocator = allocator<ranges::range_value_t<R>>>
           class Allocator = allocator<@\exposid{range-mapped-type}@<R>>>

I think both suggestions fulfill the corresponding Constraints element.

           class Allocator = allocator<void>>

Originally posted by @JohelEGP in #5626 (comment)

See also https://github.com/cplusplus/draft/pull/5626/files#r922820452.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lwgIssue must be reviewed by LWG.not-editorialIssue is not deemed editorial; the editorial issue is kept open for tracking.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions