AK: Allow bit_cast to be used in constant evaluated context

This commit is contained in:
davidot 2022-08-11 00:44:35 +02:00 committed by Andreas Kling
parent da8715a07c
commit 8be96cd7ff
Notes: sideshowbarker 2024-07-17 08:14:04 +09:00

View file

@ -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);