mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-06 16:09:30 +00:00
AK: Allow bit_cast to be used in constant evaluated context
This commit is contained in:
parent
da8715a07c
commit
8be96cd7ff
|
@ -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