Skip to content

🎨 Make cts_t and format_result easier to format #250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 11, 2025

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