Skip to content

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.

2 participants