Skip to content

LWG3810 CTAD for std::basic_format_args #1368

@jwakely

Description

@jwakely

https://cplusplus.github.io/LWG/issue3810

LWG would like design guidance here. Should CTAD work? It's currently sort-of implied it should, but only if you assume that the exposition-only types and constructors are implemented exactly as shown. If the format-arg-store-type is defined as a nested type of basic_format_args (as in libstdc++) then it doesn't work.

There's an example from Tomasz in the issue showing a case where CTAD might be useful, but Victor suggested we should explicitly disable CTAD here, because it makes it easier to create dangling references.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C++23Targeted at C++23ISShip vehicle: ISLWGLibraryformatplenary-approvedPapers approved for inclusion in their target vehicle by plenary vote.tentatively-ready-for-plenaryReviewed between meetings; ready for a vote.

    Type

    No type

    Projects

    Status

    Ready

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions