Skip to content

Conversation

@elbeno
Copy link
Contributor

@elbeno elbeno commented Jan 23, 2026

Problem:

  • Parameters cannot be named (for identification on the back end of CIB for instance).
  • Existing argument span information is unwieldy; the tuple/type_list sizes
    get big.

Solution:

  • Support naming parameters in the format string. e.g. "Hello {world}" has one
    parameter named "world". STDX_CT_FORMAT("Hello {world}", 42) results in a
    format_result containing "Hello 42" and a list of named
    arguments (type_list<named_arg<"world", int, 6, 8>> - containing the name,
    type, and span extents of the argument).
  • Named runtime arguments come out as named_arg<"world", int, 0> - the name, the
    type, and the index in the runtime arg tuple.

Note:

  • While parameters in the string are named, arguments to ct_format are still
    positional.

@elbeno elbeno force-pushed the named-args branch 2 times, most recently from 0bf37d2 to b271216 Compare January 23, 2026 18:02
Problem:
- Parameters cannot be named (for identification on the back end of CIB for instance).
- Existing argument span information is unwieldy; the `tuple`/`type_list` sizes
  get big.

Solution:
- Support naming parameters in the format string. e.g. "Hello {world}" has one
  parameter named "world". `STDX_CT_FORMAT("Hello {world}", 42)` results in a
  `format_result` containing `"Hello 42"` and a list of named
  arguments (`type_list<named_arg<"world", int, 6, 8>>` - containing the name,
  type, and span extents of the argument).
- Named runtime arguments come out as `named_arg<"world", int, 0>` - the name, the
  type, and the index in the runtime arg tuple.

Note:
- While parameters in the string are named, arguments to `ct_format` are still
  positional.
@elbeno elbeno enabled auto-merge January 23, 2026 22:52
@elbeno elbeno merged commit 59bd98c into intel:main Jan 23, 2026
138 of 142 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants