Skip to content

Conversation

elbeno
Copy link
Contributor

@elbeno elbeno commented Jul 3, 2025

Problem:

  • It's easy to accidentally forget to wrap compile-time values (with CX_VALUE or std::ct) for logging, and accidentally get runtime values instead.
  • Even when wrapping correctly, the resulting log call site is verbose.

Solution:

  • Automatically preserve compile-time values where possible.

@elbeno elbeno force-pushed the auto-ct-log branch 3 times, most recently from 38214f7 to fff8b4d Compare July 3, 2025 17:03
Problem:
- It's easy to accidentally forget to wrap compile-time values (with `CX_VALUE`
  or `std::ct`) for logging, and accidentally get runtime values instead.
- Even when wrapping correctly, the resulting log call site is verbose.

Solution:
- Automatically preserve compile-time values where possible.
Copy link
Contributor

@mjcaisse-intel mjcaisse-intel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love it! Thank you

@mjcaisse-intel mjcaisse-intel merged commit b9c6e61 into intel:main Jul 3, 2025
27 checks passed
elbeno added a commit to elbeno/cpp-std-extensions that referenced this pull request Jul 3, 2025
Problem:
- It is useful to have a macro that wraps a potentially-`constexpr`-usable value
  in `stdx::ct` when possible, to preserve its `constexpr` properties.

Solution:
- Add `CT_WRAP` that does this.

Notes:
- See intel/compile-time-init-build#743 for some parts
  of this in CIB; this part probably belongs in stdx.
elbeno added a commit to elbeno/cpp-std-extensions that referenced this pull request Jul 3, 2025
Problem:
- It is useful to have a macro that wraps a potentially-`constexpr`-usable value
  in `stdx::ct` when possible, to preserve its `constexpr` properties.

Solution:
- Add `CT_WRAP` that does this.

Notes:
- See intel/compile-time-init-build#743 for some parts
  of this in CIB; this part probably belongs in stdx.
elbeno added a commit to elbeno/cpp-std-extensions that referenced this pull request Jul 4, 2025
Problem:
- It is useful to have a macro that wraps a potentially-`constexpr`-usable value
  in `stdx::ct` when possible, to preserve its `constexpr` properties.

Solution:
- Add `CT_WRAP` that does this.

Notes:
- See intel/compile-time-init-build#743 for some parts
  of this in CIB; this part probably belongs in stdx.
elbeno added a commit to elbeno/cpp-std-extensions that referenced this pull request Jul 4, 2025
Problem:
- It is useful to have a macro that wraps a potentially-`constexpr`-usable value
  in `stdx::ct` when possible, to preserve its `constexpr` properties.

Solution:
- Add `CT_WRAP` that does this.

Notes:
- See intel/compile-time-init-build#743 for some parts
  of this in CIB; this part probably belongs in stdx.
elbeno added a commit to elbeno/cpp-std-extensions that referenced this pull request Jul 9, 2025
Problem:
- It is useful to have a macro that wraps a potentially-`constexpr`-usable value
  in `stdx::ct` when possible, to preserve its `constexpr` properties.

Solution:
- Add `CT_WRAP` that does this.

Notes:
- See intel/compile-time-init-build#743 for some parts
  of this in CIB; this part probably belongs in stdx.
elbeno added a commit to elbeno/cpp-std-extensions that referenced this pull request Jul 10, 2025
Problem:
- It is useful to have a macro that wraps a potentially-`constexpr`-usable value
  in `stdx::ct` when possible, to preserve its `constexpr` properties.

Solution:
- Add `CT_WRAP` that does this.

Notes:
- See intel/compile-time-init-build#743 for some parts
  of this in CIB; this part probably belongs in stdx.
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