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

remove const-support for align_offset and is_aligned #132423

Merged
merged 1 commit into from
Nov 4, 2024

Commits on Nov 3, 2024

  1. remove const-support for align_offset

    Operations like is_aligned would return actively wrong results at compile-time,
    i.e. calling it on the same pointer at compiletime and runtime could yield
    different results. That's no good.
    
    Instead of having hacks to make align_offset kind-of work in const-eval, just
    use const_eval_select in the few places where it makes sense, which also ensures
    those places are all aware they need to make sure the fallback behavior is
    consistent.
    RalfJung committed Nov 3, 2024
    Configuration menu
    Copy the full SHA
    19e2870 View commit details
    Browse the repository at this point in the history