Skip to content

🎨 Make cts_t and format_result easier to format#250

Merged
elbeno merged 1 commit intointel:mainfrom
elbeno:cx-strings
Jul 11, 2025
Merged

🎨 Make cts_t and format_result easier to format#250
elbeno merged 1 commit intointel:mainfrom
elbeno:cx-strings

Conversation

@elbeno
Copy link
Contributor

@elbeno elbeno commented Jul 11, 2025

Problem:

  • cts_t and format_result are non-constexpr values that generally may contain values that are constexpr-usable. CX_WRAP doesn't recognize this and wraps them in a capturing lambda as if they are runtime values.

Solution:

  • Expose cx_value_t members and call operators (like std::integral_constant has) to make cts_t and format_result constexpr usable.

Note:

  • format_result is compile-time usable iff it has no runtime format arguments and its string is also compile-time usable.

Problem:
- `cts_t` and `format_result` are non-constexpr values that generally may
  contain values that are constexpr-usable. `CX_WRAP` doesn't recognize this and
  wraps them in a capturing lambda as if they are runtime values.

Solution:
- Expose `cx_value_t` members and call operators (like `std::integral_constant`
  has) to make `cts_t` and `format_result` constexpr usable.

Note:
- `format_result` is compile-time usable iff it has no runtime format arguments
  and its string is also compile-time usable.
@elbeno elbeno merged commit dace94f into intel:main Jul 11, 2025
81 of 84 checks passed
@elbeno elbeno deleted the cx-strings branch July 11, 2025 17:22
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