mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
AK: Allow bit_cast to be used in constant evaluated context
This commit is contained in:
parent
da8715a07c
commit
8be96cd7ff
Notes:
sideshowbarker
2024-07-17 08:14:04 +09:00
Author: https://github.com/davidot Commit: https://github.com/SerenityOS/serenity/commit/8be96cd7ff Pull-request: https://github.com/SerenityOS/serenity/pull/14781 Reviewed-by: https://github.com/Hendiadyoin1 Reviewed-by: https://github.com/IdanHo
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@
|
|||
namespace AK {
|
||||
|
||||
template<typename T, typename U>
|
||||
[[nodiscard]] inline T bit_cast(const U& a)
|
||||
[[nodiscard]] constexpr inline T bit_cast(const U& a)
|
||||
{
|
||||
#if (__has_builtin(__builtin_bit_cast))
|
||||
return __builtin_bit_cast(T, a);
|
||||
|
|
Loading…
Reference in a new issue