Skip to content
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

STATIC_PROOF fails compilation if a condition can't be proven #184

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lukevalenty
Copy link
Contributor

Sometimes it is nice to require a condition to be proven at compile-time even though the exact value is not known at compile-time. STATIC_PROOF does this.

https://godbolt.org/z/9eG3f9vxa

@lukevalenty
Copy link
Contributor Author

I need to add tests, but I wanted to get this up here and talk about because its really neat. Could maybe be used to get similar or even better functionality than safe arithmetic.

@lukevalenty lukevalenty changed the title STATIC_PROOF fails compilation of a condition can't be proven STATIC_PROOF fails compilation if a condition can't be proven Jan 8, 2025
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.

1 participant