Skip to content

formatting: support named arguments #312

@bdeane-intel

Description

@bdeane-intel

We want to write code something like this:

ct_format<"Hello {world}">(arg<"world">("Earth"));

And the resulting object would be something like this (if a runtime argument):

format_result{"Hello {world}", type_map<>{}, tuple{arg<"world>("Earth")}};

or (if a compile-time argument):

format_result{"Hello Earth", type_map<arg<"world">, {6,11}>{}, tuple{}};

where {6,11} is the extent (begin & end indices) of the "world" argument after interpolation.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions