SerenityOS build: Saturday, December 21
Images 💾⌗
- serenity-x86_64-20241221-e4c3687.img.gz (Raw image, 240.81 MiB)
Last commit ⭐⌗
commit e4c36876d201fce24208e7b520d2fc734b12bdc6
Author: Nico Weber <thakis@chromium.org>
AuthorDate: Thu Dec 19 21:39:16 2024 -0500
Commit: Nico Weber <thakis@chromium.org>
CommitDate: Fri Dec 20 12:05:06 2024 -0500
AK: Make Function a little bit constexpr
Just enough to make it possible to pass a lambda to a constexpr function
taking an AK::Function parameter and have that constexpr function call
the passed-in AK::Function.
The main thing is that bit_cast<>s of pointers aren't ok in constexpr
functions, and neither is placement new. So add a union with stronger
typing for the constexpr case.
The body of the `if (is_constexpr_evaluated())` in
`init_with_callable()` is identical to the `if constexpr` right
after it. But `if constexpr (is_constexpr_evaluated())` always
evaluates `is_constexpr_evaluated()` in a constexpr context, so
this can't just add ` || is_constexpr_evaluated()` to that
`if constexpr`.
Other builds