Skip to content

Conversation

pollend
Copy link

@pollend pollend commented Sep 27, 2025

This assert can be evaluated at comptime.

@triallax
Copy link
Contributor

triallax commented Oct 7, 2025

i'm pretty sure the assert gets evaluated at comptime regardless

@pollend pollend closed this Oct 8, 2025
@pollend pollend deleted the comptime-for-approxEqRel branch October 8, 2025 01:09
@nektro
Copy link
Contributor

nektro commented Oct 8, 2025

prior to this patch it'd be a runtime panic instead of a compile error.

@pollend pollend restored the comptime-for-approxEqRel branch October 8, 2025 02:56
@pollend pollend reopened this Oct 8, 2025
@pollend
Copy link
Author

pollend commented Oct 8, 2025

this compiles in compiler explorer this should be a compile time error: https://godbolt.org/z/PW6zjz551

@triallax
Copy link
Contributor

triallax commented Oct 8, 2025

prior to this patch it'd be a runtime panic instead of a compile error.

huh, i even checked the generated assembly but i suppose it didn't show any problems because i was using f64 rather than an invalid type, that's my bad

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.

3 participants